diff --git a/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java b/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java index 1596ac2d2..56bea5abf 100644 --- a/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java +++ b/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java @@ -95,7 +95,8 @@ import org.yamj.api.common.http.SimpleHttpClientBuilder; /** * The MovieDb API *

- * This is for version 3 of the API as specified here: http://help.themoviedb.org/kb/api/about-3 + * This is for version 3 of the API as specified here: + * http://help.themoviedb.org/kb/api/about-3 * * @author stuart.boston */ @@ -193,7 +194,8 @@ public class TheMovieDbApi { * @param moviedb The moviedb object to compare too * @param title The title of the movie to compare * @param year The year of the movie to compare - * @param maxDistance The Levenshtein Distance between the two titles. 0 = exact match + * @param maxDistance The Levenshtein Distance between the two titles. 0 = + * exact match * @param caseSensitive true if the comparison is to be case sensitive * @return True if there is a match, False otherwise. */ @@ -274,7 +276,8 @@ public class TheMovieDbApi { // /** - * Get the basic information for an account. You will need to have a valid session id. + * Get the basic information for an account. You will need to have a valid + * session id. * * @param sessionId * @return @@ -440,13 +443,16 @@ public class TheMovieDbApi { // /** - * This method is used to generate a valid request token for user based authentication. + * This method is used to generate a valid request token for user based + * authentication. * * A request token is required in order to request a session id. * - * You can generate any number of request tokens but they will expire after 60 minutes. + * You can generate any number of request tokens but they will expire after + * 60 minutes. * - * As soon as a valid session id has been created the token will be destroyed. + * As soon as a valid session id has been created the token will be + * destroyed. * * @return * @throws MovieDbException @@ -456,7 +462,8 @@ public class TheMovieDbApi { } /** - * This method is used to generate a session id for user based authentication. + * This method is used to generate a session id for user based + * authentication. * * A session id is required in order to use any of the write methods. * @@ -469,7 +476,8 @@ public class TheMovieDbApi { } /** - * This method is used to generate a session id for user based authentication. User must provide their username and password + * This method is used to generate a session id for user based + * authentication. User must provide their username and password * * A session id is required in order to use any of the write methods. * @@ -486,14 +494,18 @@ public class TheMovieDbApi { /** * This method is used to generate a guest session id. * - * A guest session can be used to rate movies without having a registered TMDb user account. + * A guest session can be used to rate movies without having a registered + * TMDb user account. * - * You should only generate a single guest session per user (or device) as you will be able to attach the ratings to a TMDb user - * account in the future. + * You should only generate a single guest session per user (or device) as + * you will be able to attach the ratings to a TMDb user account in the + * future. * - * There are also IP limits in place so you should always make sure it's the end user doing the guest session actions. + * There are also IP limits in place so you should always make sure it's the + * end user doing the guest session actions. * - * If a guest session is not used for the first time within 24 hours, it will be automatically discarded. + * If a guest session is not used for the first time within 24 hours, it + * will be automatically discarded. * * @return * @throws MovieDbException @@ -529,7 +541,8 @@ public class TheMovieDbApi { /** * Get a list of Movie IDs that have been edited. * - * You can then use the movie changes API to get the actual data that has been changed. + * You can then use the movie changes API to get the actual data that has + * been changed. * * @param page * @param startDate the start date of the changes, optional @@ -537,14 +550,15 @@ public class TheMovieDbApi { * @return List of changed movie * @throws MovieDbException */ - public List getMovieChangeList(int page, String startDate, String endDate) throws MovieDbException { + public List getMovieChangeList(Integer page, String startDate, String endDate) throws MovieDbException { return tmdbChanges.getChangeList(MethodBase.MOVIE, page, startDate, endDate); } /** * Get a list of TV IDs that have been edited. * - * You can then use the TV changes API to get the actual data that has been changed. + * You can then use the TV changes API to get the actual data that has been + * changed. * * @param page * @param startDate the start date of the changes, optional @@ -552,14 +566,15 @@ public class TheMovieDbApi { * @return List of changed movie * @throws MovieDbException */ - public List getTvChangeList(int page, String startDate, String endDate) throws MovieDbException { + public List getTvChangeList(Integer page, String startDate, String endDate) throws MovieDbException { return tmdbChanges.getChangeList(MethodBase.TV, page, startDate, endDate); } /** * Get a list of Person IDs that have been edited. * - * You can then use the person changes API to get the actual data that has been changed. + * You can then use the person changes API to get the actual data that has + * been changed. * * @param page * @param startDate the start date of the changes, optional @@ -567,16 +582,18 @@ public class TheMovieDbApi { * @return List of changed movie * @throws MovieDbException */ - public List getPersonChangeList(int page, String startDate, String endDate) throws MovieDbException { + public List getPersonChangeList(Integer page, String startDate, String endDate) throws MovieDbException { return tmdbChanges.getChangeList(MethodBase.PERSON, page, startDate, endDate); } // // /** - * This method is used to retrieve all of the basic information about a movie collection. + * This method is used to retrieve all of the basic information about a + * movie collection. * - * You can get the ID needed for this method by making a getMovieInfo request for the belongs_to_collection. + * You can get the ID needed for this method by making a getMovieInfo + * request for the belongs_to_collection. * * @param collectionId * @param language @@ -602,7 +619,8 @@ public class TheMovieDbApi { // /** - * This method is used to retrieve the basic information about a production company on TMDb. + * This method is used to retrieve the basic information about a production + * company on TMDb. * * @param companyId * @return @@ -615,7 +633,8 @@ public class TheMovieDbApi { /** * This method is used to retrieve the movies associated with a company. * - * These movies are returned in order of most recently released to oldest. The default response will return 20 movies per page. + * These movies are returned in order of most recently released to oldest. + * The default response will return 20 movies per page. * * TODO: Implement more than 20 movies * @@ -625,7 +644,7 @@ public class TheMovieDbApi { * @return * @throws MovieDbException */ - public List getCompanyMovies(int companyId, String language, int page) throws MovieDbException { + public List getCompanyMovies(int companyId, String language, Integer page) throws MovieDbException { return tmdbCompany.getCompanyMovies(companyId, language, page); } // @@ -664,7 +683,8 @@ public class TheMovieDbApi { } /** - * Get the list of supported timezones for the API methods that support them. + * Get the list of supported timezones for the API methods that support + * them. * * @return @throws MovieDbException */ @@ -679,11 +699,14 @@ public class TheMovieDbApi { *

* This is currently only supported with the new credit model found in TV. *
- * These IDs can be found from any TV credit response as well as the TV_credits and combined_credits methods for people.
- * The episodes object returns a list of episodes and are generally going to be guest stars.
+ * These IDs can be found from any TV credit response as well as the + * TV_credits and combined_credits methods for people.
+ * The episodes object returns a list of episodes and are generally going to + * be guest stars.
* The season array will return a list of season numbers.
- * Season credits are credits that were marked with the "add to every season" option in the editing interface and are assumed to - * be "season regulars". + * Season credits are credits that were marked with the "add to every + * season" option in the editing interface and are assumed to be "season + * regulars". * * @param creditId * @param language @@ -697,7 +720,8 @@ public class TheMovieDbApi { // /** - * Discover movies by different types of data like average rating, number of votes, genres and certifications. + * Discover movies by different types of data like average rating, number of + * votes, genres and certifications. * * @param discover A discover object containing the search criteria required * @return @@ -708,7 +732,8 @@ public class TheMovieDbApi { } /** - * Discover movies by different types of data like average rating, number of votes, genres and certifications. + * Discover movies by different types of data like average rating, number of + * votes, genres and certifications. * * @param discover A discover object containing the search criteria required * @return @@ -721,16 +746,18 @@ public class TheMovieDbApi { // /** - * You con use this method to find movies, tv series or persons using external ids. + * You con use this method to find movies, tv series or persons using + * external ids. * * Supported query ids are *

* * For details see http://docs.themoviedb.apiary.io/#find @@ -772,9 +799,11 @@ public class TheMovieDbApi { /** * Get a list of movies per genre. * - * It is important to understand that only movies with more than 10 votes get listed. + * It is important to understand that only movies with more than 10 votes + * get listed. * - * This prevents movies from 1 10/10 rating from being listed first and for the first 5 pages. + * This prevents movies from 1 10/10 rating from being listed first and for + * the first 5 pages. * * @param genreId * @param language @@ -810,7 +839,7 @@ public class TheMovieDbApi { * @return List of movies with the keyword * @throws MovieDbException */ - public TmdbResultsList getKeywordMovies(String keywordId, String language, int page) throws MovieDbException { + public TmdbResultsList getKeywordMovies(String keywordId, String language, Integer page) throws MovieDbException { return tmdbKeywords.getKeywordMovies(keywordId, language, page); } // @@ -841,7 +870,8 @@ public class TheMovieDbApi { } /** - * This method lets users delete a list that they created. A valid session id is required. + * This method lets users delete a list that they created. A valid session + * id is required. * * @param sessionId * @param listId @@ -901,7 +931,8 @@ public class TheMovieDbApi { * * It will return the single highest rated poster and backdrop. * - * ApiExceptionType.MOVIE_ID_NOT_FOUND will be thrown if there are no movies found. + * ApiExceptionType.MOVIE_ID_NOT_FOUND will be thrown if there are no movies + * found. * * @param movieId * @param language @@ -918,7 +949,8 @@ public class TheMovieDbApi { * * It will return the single highest rated poster and backdrop. * - * ApiExceptionType.MOVIE_ID_NOT_FOUND will be thrown if there are no movies found. + * ApiExceptionType.MOVIE_ID_NOT_FOUND will be thrown if there are no movies + * found. * * @param imdbId * @param language @@ -931,7 +963,8 @@ public class TheMovieDbApi { } /** - * This method is used to retrieve all of the alternative titles we have for a particular movie. + * This method is used to retrieve all of the alternative titles we have for + * a particular movie. * * @param movieId * @param country @@ -958,7 +991,8 @@ public class TheMovieDbApi { } /** - * This method should be used when you’re wanting to retrieve all of the images for a particular movie. + * This method should be used when you’re wanting to retrieve all of the + * images for a particular movie. * * @param movieId * @param language @@ -971,7 +1005,8 @@ public class TheMovieDbApi { } /** - * This method is used to retrieve all of the keywords that have been added to a particular movie. + * This method is used to retrieve all of the keywords that have been added + * to a particular movie. * * Currently, only English keywords exist. * @@ -985,7 +1020,8 @@ public class TheMovieDbApi { } /** - * This method is used to retrieve all of the release and certification data we have for a specific movie. + * This method is used to retrieve all of the release and certification data + * we have for a specific movie. * * @param movieId * @param language @@ -998,7 +1034,8 @@ public class TheMovieDbApi { } /** - * This method is used to retrieve all of the trailers for a particular movie. + * This method is used to retrieve all of the trailers for a particular + * movie. * * Supported sites are YouTube and QuickTime. * @@ -1009,11 +1046,12 @@ public class TheMovieDbApi { * @throws MovieDbException */ public TmdbResultsList