Wildhoney / Cattery

Web-based API that delivers cats straight to your browser via JSON and YAML.

Home Page:http://api.cattery.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cattery

Web-based API that delivers cats straight to your browser via JSON and YAML.

Cat Collage


Image courtesy of [Marcos Arruda](http://www.flickriver.com/photos/marcosarruda/5199108732/).

Getting Started

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/

Limiting

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.

Type

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)

Identifier

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=...

About

Web-based API that delivers cats straight to your browser via JSON and YAML.

http://api.cattery.org/

License:MIT License


Languages

Language:Clojure 100.0%