Giter Site home page Giter Site logo

cattery's Introduction

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

cattery's People

Contributors

wildhoney avatar

Watchers

 avatar  avatar  avatar

cattery's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.