0.1.0 • Published 10 years ago
riffsy v0.1.0
Riffsy API Wrapper
Client interface for accessing Riffsy API.
Installation
Install via npm
npm install riffsy --saveUsage
Create a client object to connect to Riffsy API endpoints.
var riffsy = require('riffsy');
var client = new riffsy(RIFFSY_API_KEY);
// Now you are ready to make API calls to Riffsy.Provide parameters and a standard node callback function.
API calls follow this syntax:
client.action(queryString, callback);
queryString- API method parameters as key-value pairs.
Examples
Get GIFs for a given tag or search terms.
client.search(
{
tag: 'lol cats'
},
function(err, data) {
if (!err) {
console.log(data);
}
}
);Get a list of popular or promoted tags and categories.
client.tags(
{
type: 'featured,explore'
},
function(err, data) {
if (!err) {
console.log(data);
}
}
);Get trending, popular, and promoted GIFs and Videos.
client.trending(
{
type: 'audiovideo'
},
function(err, data) {
if (!err) {
console.log(data);
}
}
);Get popular video clips ("Riffs").
client.riffs(function(err, data) {
if (!err) {
console.log(data);
}
});API Functions
search
Get GIFs for a given tag or search terms.
tags
Get a list of popular or promoted tags and categories.
trending
Get trending, popular, and promoted GIFs and Videos.
music
Get popular video clips ("Riffs")
riffs
Same as music
reference
License
0.1.0
10 years ago