The Rotten API
the-rotten-api
is a Node.js wrapper for the Rotten Tomatoes API v1.0.
Installation
$ npm install --save the-rotten-api
Usage Examples
Movie search:
var rt = ;rt; rt
Movie info:
var rt = ;rt; var movieId = 12897; rt
Methods
Search
Search for movies.
.search(query | [options], callback)
Options:
Name | Description | Type | Required |
---|---|---|---|
query | The plain text search query to search for a movie. | String |
Yes |
page | The selected page of movie search results | Number |
No |
pageLimit | The amount of movie search results to show per page | Number |
No |
Lists
Rotten Tomatoes available lists.
.lists(directory, callback)
Name | Description | Type | Required |
---|---|---|---|
movies | Shows the movie lists we have available | String |
No |
dvds | Shows the DVD lists we have available | String |
No |
empty string |
Displays the top level lists available in the API. | String |
Yes |
info
Detailed information on a specific movie specified by Id. You can also limit the results to cast
and reviews
.
.info(id | [options], callback)
Name | Description | Type | Required |
---|---|---|---|
id | The movie's id | Number |
Yes |
limitTo | cast or reviews |
String |
No |
movies
.movies(list | [options], callback)
Search for a specific list of movies.
Name | Description | Type | Required |
---|---|---|---|
list | box_office , in_theaters , opening , upcoming |
String |
Yes |
limit | Limits the number of box office movies returned | Number |
No |
page | The selected page of in theaters movies | Number |
No |
country | Provides localized data for the selected country (ISO 3166-1 alpha-2) if available. Otherwise, returns US data. | String |
No |
Contribution
Contributions are welcome.
git clone
the Github repository:
$ git clone https://github.com/gmontalvoriv/the-rotten-api.git