API help

Associate
Joined
30 Dec 2008
Posts
413
Location
York
It appears to be an HTTP (probably RESTful) service.

Looking at the link you've provided, they all seem to be GET requests. Each endpoint you call (search.json, city.json, etc.) will return a JSON object that contains any results that match your query.

I'm not familiar with rails, but you need some way of creating and sending a GET request to their API. In PHP you could use cURL, but I'm not sure what the alternative is for rails.

In fact, open up a new tab in your browser and go to http://api.gigatools.com/city.json?cities[]=London&api_key=<YOUR API KEY> and you should get a JSON response.
 
Back
Top Bottom