Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Skookum/tomatoes
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterloftis committed May 15, 2013
2 parents 0648430 + 0a2a8b5 commit 42a28d4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions index.js
Expand Up @@ -40,6 +40,21 @@ Tomato.prototype.get = function(id, done) {
});
};

// Get List
// listType : movies or dvds
// listName: box_office, in_theaters etc...

Tomato.prototype.getList = function(listType, listName, done) {
request
.get('http://api.rottentomatoes.com/api/public/v1.0/lists/' + listType + '/' + listName + '.json')
.send({ apiKey: this.key })
.end(function(err, res) {
var body = toJSON(res.text);
var result = body ? body : undefined;
return done(err, result);
});
};

// Utils

function toJSON(str) {
Expand Down

0 comments on commit 42a28d4

Please sign in to comment.