Cronblocks API Documentation – GetCityLike

HTTP Method: GET
URL: http://api.cronblocks.com/get_city_like.html
Input Parameters:
	api_key (required)
        country (required) * see below
        city (required)
	data_type (optional, defaults to JSON)

Output:
	array(
            assoc_array(city_id
                        city
                        region_name
                        )
        )

To assist in User Interface building, we offer the get_city_like method which will return information for cities which names start with a given string, within a given country.

* The value for country can be either the country’s exact name or ID, as returned from get_country_like

Example:

http://api.cronblocks.com/get_city_like.html?api_key=1234567890abcdef&country=brazil&city=rio+de

Returns:

{"api_name":"get_city_like","status":"SUCCESS","data":[{"city_id":"90244","city":"Rio De Janeiro","region_name":"Rio de Janeiro"}]}

Posted in API Documentation | Tagged , Leave a comment

Cronblocks API Documentation – GetCityIndex

HTTP Method: GET
URL: http://api.cronblocks.com/get_city_index.html
Input Parameters:
	api_key (required)
        country (required) * -- see below
	data_type (optional, defaults to JSON)

Output:
	array of letters

To assist in User Interface building, we offer the get_city_index method which will return the first letter of all cities in our database for a given country.

* The value for country can be either the country’s exact name or ID, as returned from get_country_like

Example:

http://api.cronblocks.com/get_city_index.html?api_key=1234567890abcdef&country=brazil

Posted in API Documentation | Tagged , Leave a comment

Cronblocks API Documentation – GetCountryLike

HTTP Method: GET
URL: http://api.cronblocks.com/get_country_like.html
Input Parameters:
	api_key (required)
        country (required)
	data_type (optional, defaults to JSON)

Output:
	array(
            assoc_array(country_id
                        country_code
                        country_name
                        has_cities)
        )

To assist in User Interface building, we offer the get_country_like method which will return information for countries which names start with a given string. The string provided must be at least 3 characters long.

Example:

http://api.cronblocks.com/get_country_like.html?api_key=1234567890abcdef&country=bra

Returns:

{"api_name":"get_country_like","status":"SUCCESS","data":[{"country_id":"35","country_code":"BR","country_name":"Brazil","has_cities":"1"}]}

Posted in API Documentation | Tagged , Leave a comment

Cronblocks API Documentation – GetCountryIndex

HTTP Method: GET
URL: http://api.cronblocks.com/get_country_index.html
Input Parameters:
	api_key (required)
	data_type (optional, defaults to JSON)

Output:
	array of letters    

To assist in User Interface building, we offer the get_country_index method which will return the first letter of all countries in our database.

Example:

http://api.cronblocks.com/get_country_index.html?api_key=1234567890abcdef&data_type=json

Posted in API Documentation | Tagged , Leave a comment

Cronblocks API Documentation – GeoIP

HTTP Method: GET
URL: http://api.cronblocks.com/geoip.html
Input Parameters:
	api_key (required)
	ip (required, valid_ip)
	data_type (optional, defaults to JSON)

Output:
	country_code
	region
	city

The GeoIP method is used to fetch a geographic location from a given IP. The number of allowed requests per month depends on the caller’s plan:

Plan Requests/month
Free 1000
Silver 10000
Gold 50000
Platinum Unlimited

If the maximum number of requests is reached, an ERROR response with the appropriate message will be returned.

Example:

http://api.cronblocks.com/geoip.html?api_key=1234567890abcdef&ip=210.210.210.210&data_type=json

Posted in API Documentation | Tagged , Leave a comment

Cronblocks API Documentation – Available Methods

Cronblocks offers the following methods for third-party communication.

Method Description
Sign Up Use to create a new account
GeoIP Fetch a geographic location from a given IP

Posted in API Documentation | Tagged Leave a comment

Cronblocks API Documentation – Introduction

Getting your API Key

To begin using Cronblocks.com’s API, you need to first get your API key. API keys are unique to each user and can be found under the Profile section of the Admin Interface.

Input/Output Formats

Cronblocks.com uses REST to communicate with third parties. Methods which present data will only accept GET requests, while methods which change data require POST requests. Check the individual method documentation to see which one to use.

Output format can be specified by the caller through the data_type input parameter. Accepted values are: JSON (default) and XML. Case insensitive. The output format will vary according to SUCCESSful or ERRORed results.

For ERROR replies, a typical JSON output will be as follows:

{"status":"ERROR","msg":"Some Error Message"}

Its XML counterpart will be:

<?xml version="1.0"?>
<api_name>
    <status>ERROR</status>
    <msg>Some Error Message</msg>
</api_name>

For SUCCESS replies, there will be a status section and a data section. The data section will vary according to the API called. A typical Sign Up call would yield:

{"api_name":"sign_up","status":"SUCCESS","data":{"user_id":1}}

or

<?xml version="1.0"?>
<sign_up>
    <status>SUCCESS</status>
    <data>
        <api_key>abcdefghi123435</api_key>
    </data>
</sign_up>

See available methods in the sidebar menu.

Posted in API Documentation | Tagged Leave a comment

Release: New API system

Users now have the power to call Cronblocks functionality through an API system.

Have a look at the documentation to find out more!

Posted in Novelties | Tagged , , Leave a comment

Channel Code Link in Blocks Page

Added a Channel Code Link to the Blocks page. No need to go back to the Channels page to get the code anymore.

Cheers,
Vinny

Posted in Novelties |Leave a comment