Rotten Tomatoes
Rotten Tomatoes is a promise-based module for interacting with the Rotten Tomatoes api. It runs in node.js and the browser.
Installation
npm install --save rotten-tomatoes
Usage
var RottenTomatoes = require('rotten-tomatoes');var rt = new RottenTomatoes('my rotten tomatoes api key'); // Toy Story 3 rotten tomatoes idrt.get('770672122') .then(function (response) { console.log('response', response); });
API
// pass in the api key as a stringvar rt = new RottenTomatoes(apiKey); // get a movie by rotten tomatoes idvar promise = rt.get('770672122'); // get 25 search results for 'Toy Story'promise = rt.search('Toy Story', {page: 1, page_size: 25}) // get the rotten tomatoes info for an imdb idpromise = rt.getByImdbId('0103776');
License
MIT