public class RottenTomatoesApi extends Object
Constructor and Description |
---|
RottenTomatoesApi(String apiKey) |
RottenTomatoesApi(String apiKey,
org.apache.http.client.HttpClient httpClient) |
Modifier and Type | Method and Description |
---|---|
List<RTMovie> |
getBoxOffice()
Displays top box office earning movies, sorted by most recent weekend
gross ticket sales.
|
List<RTMovie> |
getBoxOffice(String country)
Displays top box office earning movies, sorted by most recent weekend
gross ticket sales.
|
List<RTMovie> |
getBoxOffice(String country,
int limit)
Displays top box office earning movies, sorted by most recent weekend
gross ticket sales.
|
List<RTCast> |
getCastInfo(int movieId)
Pulls the complete movie cast for a movie
|
List<RTMovie> |
getCurrentReleaseDvds()
Retrieves current release DVDs
|
List<RTMovie> |
getCurrentReleaseDvds(String country)
Retrieves current release DVDs
|
List<RTMovie> |
getCurrentReleaseDvds(String country,
int page,
int pageLimit)
Retrieves current release DVDs
|
RTMovie |
getDetailedInfo(int movieId)
Detailed information on a specific movie specified by Id.
|
Map<String,String> |
getDvdListsDirectory()
Shows the DVD lists available
|
List<RTMovie> |
getInTheaters()
Retrieves movies currently in theaters
|
List<RTMovie> |
getInTheaters(String country)
Retrieves movies currently in theaters
|
List<RTMovie> |
getInTheaters(String country,
int page,
int pageLimit)
Retrieves movies currently in theaters
|
Map<String,String> |
getListsDirectory()
Displays the top level lists available in the API
|
List<RTClip> |
getMovieClips(int movieId)
Related movie clips and trailers for a movie
|
Map<String,String> |
getMovieListsDirectory()
Shows the movie lists available
|
RTMovie |
getMoviesAlias(String altMovieId,
String type)
Provides a movie lookup by an id from a different vendor
|
List<Review> |
getMoviesReviews(int movieId)
Retrieves the reviews for a movie
|
List<Review> |
getMoviesReviews(int movieId,
String country)
Retrieves the reviews for a movie
|
List<Review> |
getMoviesReviews(int movieId,
String reviewType,
int pageLimit,
int page,
String country)
Retrieves the reviews for a movie
|
List<Review> |
getMoviesReviews(int movieId,
String reviewType,
String country)
Retrieves the reviews for a movie
|
List<RTMovie> |
getMoviesSearch(String query)
The movies search endpoint for plain text queries.
|
List<RTMovie> |
getMoviesSearch(String query,
int pageLimit,
int page)
The movies search endpoint for plain text queries.
|
List<RTMovie> |
getMoviesSimilar(int movieId)
Returns similar movies to a movie
|
List<RTMovie> |
getMoviesSimilar(int movieId,
int limit)
Returns similar movies to a movie
|
List<RTMovie> |
getNewReleaseDvds()
Retrieves new release DVDs
|
List<RTMovie> |
getNewReleaseDvds(String country)
Retrieves new release DVDs
|
List<RTMovie> |
getNewReleaseDvds(String country,
int page,
int pageLimit)
Retrieves new release DVDs
|
List<RTMovie> |
getOpeningMovies()
Retrieves current opening movies
|
List<RTMovie> |
getOpeningMovies(String country)
Retrieves current opening movies
|
List<RTMovie> |
getOpeningMovies(String country,
int limit)
Retrieves current opening movies
|
List<RTMovie> |
getTopRentals()
Retrieves the current top DVD rentals
|
List<RTMovie> |
getTopRentals(String country)
Retrieves the current top DVD rentals
|
List<RTMovie> |
getTopRentals(String country,
int limit)
Retrieves the current top DVD rentals
|
List<RTMovie> |
getUpcomingDvds()
Retrieves current release DVDs
|
List<RTMovie> |
getUpcomingDvds(String country)
Retrieves current release DVDs
|
List<RTMovie> |
getUpcomingDvds(String country,
int page,
int pageLimit)
Retrieves current release DVDs
|
List<RTMovie> |
getUpcomingMovies()
Retrieves upcoming movies
|
List<RTMovie> |
getUpcomingMovies(String country)
Retrieves upcoming movies
|
List<RTMovie> |
getUpcomingMovies(String country,
int page,
int pageLimit)
Retrieves upcoming movies
|
void |
setRetryDelay(long retryDelay)
Set the delay time between API retries when the account is over it's
limit
|
void |
setRetryLimit(int retryLimit)
Number of times to retry the API call when the account limit is hit.
|
public RottenTomatoesApi(String apiKey) throws RottenTomatoesException
RottenTomatoesException
public RottenTomatoesApi(String apiKey, org.apache.http.client.HttpClient httpClient) throws RottenTomatoesException
RottenTomatoesException
public void setRetryDelay(long retryDelay)
retryDelay
- milliseconds to delay for, default is 500mspublic void setRetryLimit(int retryLimit)
retryLimit
- Number of retries, default is 5public List<RTMovie> getBoxOffice(String country, int limit) throws RottenTomatoesException
limit
- Limits the number of movies returnedcountry
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getBoxOffice() throws RottenTomatoesException
RottenTomatoesException
public List<RTMovie> getBoxOffice(String country) throws RottenTomatoesException
country
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getInTheaters(String country, int page, int pageLimit) throws RottenTomatoesException
country
- Provides localized data for the selected countrypage
- The selected page of in theaters moviespageLimit
- The amount of movies in theaters to show per pageRottenTomatoesException
public List<RTMovie> getInTheaters(String country) throws RottenTomatoesException
country
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getInTheaters() throws RottenTomatoesException
RottenTomatoesException
public List<RTMovie> getOpeningMovies(String country, int limit) throws RottenTomatoesException
country
- Provides localized data for the selected countrylimit
- Limits the number of opening movies returnedRottenTomatoesException
public List<RTMovie> getOpeningMovies(String country) throws RottenTomatoesException
country
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getOpeningMovies() throws RottenTomatoesException
RottenTomatoesException
public List<RTMovie> getUpcomingMovies(String country, int page, int pageLimit) throws RottenTomatoesException
country
- Provides localized data for the selected countrypage
- The selected page of in theaters moviespageLimit
- The amount of movies in theaters to show per pageRottenTomatoesException
public List<RTMovie> getUpcomingMovies(String country) throws RottenTomatoesException
country
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getUpcomingMovies() throws RottenTomatoesException
RottenTomatoesException
public List<RTMovie> getTopRentals(String country, int limit) throws RottenTomatoesException
country
- Provides localized data for the selected countrylimit
- Limits the number of opening movies returnedRottenTomatoesException
public List<RTMovie> getTopRentals(String country) throws RottenTomatoesException
country
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getTopRentals() throws RottenTomatoesException
RottenTomatoesException
public List<RTMovie> getCurrentReleaseDvds(String country, int page, int pageLimit) throws RottenTomatoesException
country
- Provides localized data for the selected countrypage
- The selected page of in theaters moviespageLimit
- The amount of movies in theaters to show per pageRottenTomatoesException
public List<RTMovie> getCurrentReleaseDvds(String country) throws RottenTomatoesException
country
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getCurrentReleaseDvds() throws RottenTomatoesException
RottenTomatoesException
public List<RTMovie> getNewReleaseDvds(String country, int page, int pageLimit) throws RottenTomatoesException
country
- Provides localized data for the selected countrypage
- The selected page of in theaters moviespageLimit
- The amount of movies in theaters to show per pageRottenTomatoesException
public List<RTMovie> getNewReleaseDvds(String country) throws RottenTomatoesException
country
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getNewReleaseDvds() throws RottenTomatoesException
RottenTomatoesException
public List<RTMovie> getUpcomingDvds(String country, int page, int pageLimit) throws RottenTomatoesException
country
- Provides localized data for the selected countrypage
- The selected page of in theaters moviespageLimit
- The amount of movies in theaters to show per pageRottenTomatoesException
public List<RTMovie> getUpcomingDvds(String country) throws RottenTomatoesException
country
- Provides localized data for the selected countryRottenTomatoesException
public List<RTMovie> getUpcomingDvds() throws RottenTomatoesException
RottenTomatoesException
public RTMovie getDetailedInfo(int movieId) throws RottenTomatoesException
movieId
- RT Movie ID to locateRottenTomatoesException
public List<RTCast> getCastInfo(int movieId) throws RottenTomatoesException
movieId
- RT Movie IDRottenTomatoesException
public List<RTClip> getMovieClips(int movieId) throws RottenTomatoesException
movieId
- RT Movie IDRottenTomatoesException
public List<Review> getMoviesReviews(int movieId, String reviewType, int pageLimit, int page, String country) throws RottenTomatoesException
movieId
- reviewType
- pageLimit
- page
- country
- RottenTomatoesException
public List<Review> getMoviesReviews(int movieId, String reviewType, String country) throws RottenTomatoesException
movieId
- reviewType
- country
- RottenTomatoesException
public List<Review> getMoviesReviews(int movieId, String country) throws RottenTomatoesException
movieId
- country
- RottenTomatoesException
public List<Review> getMoviesReviews(int movieId) throws RottenTomatoesException
movieId
- RottenTomatoesException
public List<RTMovie> getMoviesSimilar(int movieId, int limit) throws RottenTomatoesException
movieId
- RT Movie IDlimit
- Limit number of returned moviesRottenTomatoesException
public List<RTMovie> getMoviesSimilar(int movieId) throws RottenTomatoesException
movieId
- RT Movie IDRottenTomatoesException
public RTMovie getMoviesAlias(String altMovieId, String type) throws RottenTomatoesException
altMovieId
- type
- RottenTomatoesException
public List<RTMovie> getMoviesSearch(String query, int pageLimit, int page) throws RottenTomatoesException
query
- pageLimit
- page
- RottenTomatoesException
public List<RTMovie> getMoviesSearch(String query) throws RottenTomatoesException
query
- RottenTomatoesException
public Map<String,String> getListsDirectory() throws RottenTomatoesException
RottenTomatoesException
public Map<String,String> getMovieListsDirectory() throws RottenTomatoesException
RottenTomatoesException
public Map<String,String> getDvdListsDirectory() throws RottenTomatoesException
RottenTomatoesException
Copyright © 2012–2017. All rights reserved.