0.0.6 • Published 8 years ago

rovijs v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

rovijs

Simple node.js client for querying the rovi api. Based on echonestjs by dinostheo

Installation

  npm install rovijs --save

Usage

The rovijs module exposes a singleton object, which you can initialize once with the api key, which is handy to use with application frameworks such as express.

  var Rovi = require('rovijs');

  Rovi.init('YOUR ROVI API KEY', 'YOUR ROVI API SECRET');

  Rovi.get('echonest/endpoint', {'the necessary parameters'}, callback);

e.g.

  var Rovi = require('rovijs');

  Rovi.init('abcdefghijklmnopqrstuvwx', 'abcdefghij');

  Rovi.get("name/videos", { "name": "Kanye West" }, function (err, res) {
        if (err) {
          console.log(err);
        } else {
          console.log(res);
        }
  });

Tests

To run the tests simply execute:

    npm test

The tests have a dependency of a configuration file config/config.js of the following structure:

/**
 * Module configuration.
 *
 * Contains the rovi api key and secret for the tests.
 *
 * config/config.js
 */
module.exports = {
    api_key: 'PLACE YOUR ROVI API KEY HERE',
    secret: 'PLACE YOUR ROVI SECRET HERE',
};

Dependencies

request

0.0.6

8 years ago

0.0.5

8 years ago