Web-based API that delivers cats straight to your browser via JSON and YAML.
Image courtesy of [Marcos Arruda](http://www.flickriver.com/photos/marcosarruda/5199108732/).
All requests are routed through the index (/
) route, and you pass additional options to the URL. By default a JSON response of 10 cat images are returned.
curl -i -X GET http://api.cattery.org/
Providing the limit
parameter will limit the amount of cats returned — when you specify 1 then a non-array will be returned that will contain the one entry.
curl -i -X GET http://api.cattery.org/?limit=1
curl -i -X GET http://api.cattery.org/?limit=25
curl -i -X GET http://api.cattery.org/?limit=100
Note: You can specify a maximum of 100.
By supplying the type
parameter you can specify how the data is returned. By default the json
parameter is used – however you can return xml
, jsonp
(with a function to invoke) and image
(which will automatically limit to 1).
curl -i -X GET http://api.cattery.org/?type=xml
curl -i -X GET http://api.cattery.org/?type=image&limit=1
curl -i -X GET http://api.cattery.org/?type=jsonp(callbackFn)
All cats returned have an ID associated with them in the id
field. You can therefore request exact cat pictures using this ID by providing the id
parameter.
curl -i -X GET http://api.cattery.org/?id=...