GithubHelp home page GithubHelp logo

cfcat's Introduction

CFCat

A CFML wrapper for The Cat API.
Some people are dog people. Some people are cat people. This wrapper will provide the latter with cats on demand.

Feel free to use the issue tracker to report bugs or suggest improvements!

Acknowledgements

This project borrows heavily from the API frameworks built by jcberquist, such as xero-cfml and aws-cfml. Because it draws on those projects, it is also licensed under the terms of the MIT license.

Table of Contents

Quick Start

There is only one type of demo: the cat picture demo. So, here you go "Cats As A Service":

catapi = new path.to.cfcat.catapi( apiKey = 'xxx' );

randomCat = catapi.getRandom().data;

writeOutput( '<img src="#randomCat.url#">' );

Reference Manual

search( required struct data )

Search and iterate through all public images. For the data arguments, see the documentation for available parameters.

searchByCategory( required any category, required struct data )

Convenience method to define a category of images to search within (i.e. only cats in sunglasses). The category argument can be a single id, a comma separated list, or an array of category ids.

getRandom()

Convenience method that delegates to search(), which returns a random image when no parameters are provided

getRandomGif()

Convenience method that delegates to search() and provides the mime type argument. Sometimes you just need cat gifs.

listBreeds()

List available cat breeds and their properties

listCategories()

List available cat image categories and their ids, for use in other API methods


cfcat's People

Contributors

mjclemente avatar

Watchers

 avatar  avatar  avatar

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.