Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ttpro1995 committed Nov 10, 2016
1 parent 34695f9 commit 7fb24f6
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# TheCatAPI helper
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 <br>
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**
```javascript
var thecatapi = require('thecatapi-helper')

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

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

// link with category, api, file type ,size,
var very_customize_link1 = thecatapi.linkbuilder('caturday','MTM1MDM1','jpg','full');
var very_customize_link2 = thecatapi.linkbuilder('caturday','MTM1MDM1','png','med');
var very_customize_link3 = thecatapi.linkbuilder('caturday','MTM1MDM1','gif','small');
console.log(very_customize_link1);
console.log(very_customize_link2);
console.log(very_customize_link3);
```
### Disclaimer:
I am not author nor partner of http://thecatapi.com/ , but a cat lover.
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,17 @@
"cat"
],
"author": "Thai Thien",
"license": "MIT"
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ttpro1995/thecatapi-helper.git"
},
"bugs": {
"url": "https://github.com/ttpro1995/thecatapi-helper/issues"
},
"homepage": "https://github.com/ttpro1995/thecatapi-helper#readme",
"dependencies": {
"microtime": "^2.1.1",
"request": "^2.78.0"
}
}

0 comments on commit 7fb24f6

Please sign in to comment.