No description
Find a file
2015-08-01 23:38:26 -04:00
lib a couple small tweaks to the promisify helper 2015-08-01 23:25:02 -04:00
test adds listening tests 2015-08-01 23:25:27 -04:00
.gitignore adds gitignore & npm package.json 2015-07-31 15:52:47 -04:00
.travis.yml adds travis 2015-08-01 20:04:08 -04:00
gulpfile.js adds travis 2015-08-01 20:04:08 -04:00
index.js adds main npr module 2015-08-01 20:06:15 -04:00
LICENSE adds license 2015-08-01 23:38:26 -04:00
package.json updates README with example & changes package name to npr-api 2015-08-01 23:23:39 -04:00
README.md updates README description 2015-08-01 23:26:58 -04:00

Node.js NPR API Build Status

A Node.js package for accessing NPR APIs.

Installation

$ mkdir npr_test && cd npr_test
$ npm install npr-api

Usage

As of right now, the full NPR One API is available in this package. There are more examples in the test directory.

Example: getting recommendations for your user

var NPR = require('npr-api');

var npr = NPR({
  client_id: 'your_client_id',
  client_secret: 'your_client_secret',
  username: 'your_username',
  password: 'your_password'
});

npr.one.init()
  .then(npr.one.listening.getRecommendations({ channel: 'npr' }))
  .then(function(recommendations) {
    console.log(recommendations);
  }).catch(console.err);