0.1.4 • Published 10 years ago

apigiphy v0.1.4

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

apigiphy Build Status

Giphy API made simple.

A node implementation of Giphy API requests. Check GiphyApi for more info.

Install

npm install --save apigiphy

Usage

var giphy = require('apigiphy');
giphy = giphy({api_key:YOUR_GIPHY_API_KEY});
giphy.random({tag:"flip the table"})
.then(function(response){
  console.log(response.data.image_original_url);
  // http://s3.amazonaws.com/giphymedia/media/2jlDkaipGfgGc/200_d.gif
}, function(error){
  console.log(error);  
});

Implemented methods

.search({
  q: q, // search query term or phrase
  limit: limit, // (optional) number of results to return, maximum 100. Default 25
  offset: offset, // (optional) results offset, defaults to 0
  rating: rating // limit results to those rated (y,g, pg, pg-13 or r).,
  stickers: false // (optional) set to true to search stickers api instead of gifs api. Default false
}).then(success, error);

.random({
  tag: tag, // the GIF tag to limit randomness by
  rating: rating // limit results to those rated (y,g, pg, pg-13 or r).
  stickers: false, // (optional) set to true to search stickers api instead of gifs api. Default false
}).then(success, error);

.trending({
    limit: limit, // (optional) number of results to return, maximum 100. Default 25
    rating: rating, // limit results to those rated (y,g, pg, pg-13 or r).
    stickers: false // (optional) set to true to search stickers api instead of gifs api. Default false
}).then(success, error);

Run the example

git clone https://github.com/Urucas/apigiphy.git && cd apigiphy
make clean && make
node example/simple.js
0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago