Have ideas to improve npm?Join in the discussion! »

    riffsy

    0.1.0 • Public • Published

    Riffsy API Wrapper

    Client interface for accessing Riffsy API.

    NPM version

    Installation

    Install via npm

    npm install riffsy --save

    Usage

    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

    MIT

    Install

    npm i riffsy

    DownloadsWeekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • avatar