th

thecatapi-helper

Helper function (such as link builder) for TheCatAPI.com

Showing:

Popularity

Downloads/wk

12

GitHub Stars

0

Maintenance

Last Commit

4yrs ago

Contributors

2

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

TheCatAPI helper

Build Status npm version saythanks

This node module provides you some help so you can enjoy cats.

Installation

npm install thecatapi-helper --save

linkbuilder

linkbuilder(category, api_key, type = "jpg", size = "full")

category See full list of category here: http://thecatapi.com/api/categories/list
example: "boxes" to show cat in the box

api_key Get you API key here: http://thecatapi.com/api-key-registration.html

type Type of file which you would like TheCatAPI to give you. ("png", "jpg", "gif")

size File size. ("small", "med", "full").

Example

var thecatapi = require('thecatapi-helper')


// just an simple link with no api, no argument
var simpleLink = thecatapi.linkbuilder()
console.log(simpleLink)

// with category and api
var normalLink = thecatapi.linkbuilder('caturday', 'MTM1MDM1')
console.log(normalLink)

// link with category, api, file type ,size,
var customizeLink1 = thecatapi.linkbuilder('caturday', 'MTM1MDM1', 'jpg', 'full')
var customizeLink2 = thecatapi.linkbuilder('caturday', 'MTM1MDM1', 'png', 'med')
var customizeLink3 = thecatapi.linkbuilder('caturday', 'MTM1MDM1', 'gif', 'small')
console.log(customizeLink1)
console.log(customizeLink2)
console.log(customizeLink3)

Disclaimer:

I am not author nor partner of http://thecatapi.com/ , but a cat lover.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100