Rename ResultList

This commit is contained in:
Stuart Boston
2015-03-05 21:33:06 +00:00
parent 573d97c906
commit 5c56e20f73
27 changed files with 208 additions and 208 deletions
@@ -80,7 +80,7 @@ import com.omertron.themoviedbapi.model.person.PersonFind;
import com.omertron.themoviedbapi.model.review.Review;
import com.omertron.themoviedbapi.model.tv.TVBasic;
import com.omertron.themoviedbapi.model.tv.TVInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.results.TmdbResultsMap;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -206,7 +206,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getFavoriteMovies(String sessionId, int accountId) throws MovieDbException {
public ResultList<MovieBasic> getFavoriteMovies(String sessionId, int accountId) throws MovieDbException {
return tmdbAccount.getFavoriteMovies(sessionId, accountId);
}
@@ -236,7 +236,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getRatedMovies(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
public ResultList<MovieBasic> getRatedMovies(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
return tmdbAccount.getRatedMovies(sessionId, accountId, page, sortBy, language);
}
@@ -251,7 +251,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<TVBasic> getRatedTV(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
public ResultList<TVBasic> getRatedTV(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
return tmdbAccount.getRatedTV(sessionId, accountId, page, sortBy, language);
}
@@ -266,7 +266,7 @@ public class TheMovieDbApi {
* @return The watchlist of the user
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getWatchListMovie(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
public ResultList<MovieBasic> getWatchListMovie(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
return tmdbAccount.getWatchListMovie(sessionId, accountId, page, sortBy, language);
}
@@ -281,7 +281,7 @@ public class TheMovieDbApi {
* @return The watchlist of the user
* @throws MovieDbException
*/
public TmdbResultsList<TVBasic> getWatchListTV(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
public ResultList<TVBasic> getWatchListTV(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
return tmdbAccount.getWatchListTV(sessionId, accountId, page, sortBy, language);
}
@@ -321,7 +321,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<TVBasic> getFavoriteTv(String sessionId, int accountId) throws MovieDbException {
public ResultList<TVBasic> getFavoriteTv(String sessionId, int accountId) throws MovieDbException {
return tmdbAccount.getFavoriteTv(sessionId, accountId);
}
@@ -335,7 +335,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getGuestRatedMovies(String guestSessionId, String language, Integer page, SortBy sortBy) throws MovieDbException {
public ResultList<MovieBasic> getGuestRatedMovies(String guestSessionId, String language, Integer page, SortBy sortBy) throws MovieDbException {
return tmdbAccount.getGuestRatedMovies(guestSessionId, language, page, sortBy);
}
//</editor-fold>
@@ -449,7 +449,7 @@ public class TheMovieDbApi {
* @return List of changed movie
* @throws MovieDbException
*/
public TmdbResultsList<ChangeListItem> getMovieChangeList(Integer page, String startDate, String endDate) throws MovieDbException {
public ResultList<ChangeListItem> getMovieChangeList(Integer page, String startDate, String endDate) throws MovieDbException {
return tmdbChanges.getChangeList(MethodBase.MOVIE, page, startDate, endDate);
}
@@ -465,7 +465,7 @@ public class TheMovieDbApi {
* @return List of changed movie
* @throws MovieDbException
*/
public TmdbResultsList<ChangeListItem> getTvChangeList(Integer page, String startDate, String endDate) throws MovieDbException {
public ResultList<ChangeListItem> getTvChangeList(Integer page, String startDate, String endDate) throws MovieDbException {
return tmdbChanges.getChangeList(MethodBase.TV, page, startDate, endDate);
}
@@ -481,7 +481,7 @@ public class TheMovieDbApi {
* @return List of changed movie
* @throws MovieDbException
*/
public TmdbResultsList<ChangeListItem> getPersonChangeList(Integer page, String startDate, String endDate) throws MovieDbException {
public ResultList<ChangeListItem> getPersonChangeList(Integer page, String startDate, String endDate) throws MovieDbException {
return tmdbChanges.getChangeList(MethodBase.PERSON, page, startDate, endDate);
}
//</editor-fold>
@@ -511,7 +511,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Artwork> getCollectionImages(int collectionId, String language) throws MovieDbException {
public ResultList<Artwork> getCollectionImages(int collectionId, String language) throws MovieDbException {
return tmdbCollections.getCollectionImages(collectionId, language);
}
//</editor-fold>
@@ -575,7 +575,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<JobDepartment> getJobs() throws MovieDbException {
public ResultList<JobDepartment> getJobs() throws MovieDbException {
return tmdbConfiguration.getJobs();
}
@@ -678,7 +678,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Genre> getGenreMovieList(String language) throws MovieDbException {
public ResultList<Genre> getGenreMovieList(String language) throws MovieDbException {
return tmdbGenre.getGenreMovieList(language);
}
@@ -689,7 +689,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Genre> getGenreTVList(String language) throws MovieDbException {
public ResultList<Genre> getGenreTVList(String language) throws MovieDbException {
return tmdbGenre.getGenreTVList(language);
}
@@ -736,7 +736,7 @@ public class TheMovieDbApi {
* @return List of movies with the keyword
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getKeywordMovies(String keywordId, String language, Integer page) throws MovieDbException {
public ResultList<MovieBasic> getKeywordMovies(String keywordId, String language, Integer page) throws MovieDbException {
return tmdbKeywords.getKeywordMovies(keywordId, language, page);
}
//</editor-fold>
@@ -884,7 +884,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<AlternativeTitle> getMovieAlternativeTitles(int movieId, String country, String... appendToResponse) throws MovieDbException {
public ResultList<AlternativeTitle> getMovieAlternativeTitles(int movieId, String country, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getMovieAlternativeTitles(movieId, country, appendToResponse);
}
@@ -910,7 +910,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Artwork> getMovieImages(int movieId, String language, String... appendToResponse) throws MovieDbException {
public ResultList<Artwork> getMovieImages(int movieId, String language, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getMovieImages(movieId, language, appendToResponse);
}
@@ -925,7 +925,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Keyword> getMovieKeywords(int movieId, String... appendToResponse) throws MovieDbException {
public ResultList<Keyword> getMovieKeywords(int movieId, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getMovieKeywords(movieId, appendToResponse);
}
@@ -939,7 +939,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<ReleaseInfo> getMovieReleaseInfo(int movieId, String language, String... appendToResponse) throws MovieDbException {
public ResultList<ReleaseInfo> getMovieReleaseInfo(int movieId, String language, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getMovieReleaseInfo(movieId, language, appendToResponse);
}
@@ -955,7 +955,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Video> getMovieVideos(int movieId, String language, String... appendToResponse) throws MovieDbException {
public ResultList<Video> getMovieVideos(int movieId, String language, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getMovieVideos(movieId, language, appendToResponse);
}
@@ -968,7 +968,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Translation> getMovieTranslations(int movieId, String... appendToResponse) throws MovieDbException {
public ResultList<Translation> getMovieTranslations(int movieId, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getMovieTranslations(movieId, appendToResponse);
}
@@ -988,7 +988,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getSimilarMovies(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
public ResultList<MovieInfo> getSimilarMovies(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getSimilarMovies(movieId, page, language, appendToResponse);
}
@@ -1002,7 +1002,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Review> getMovieReviews(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
public ResultList<Review> getMovieReviews(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getMovieReviews(movieId, page, language, appendToResponse);
}
@@ -1016,7 +1016,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<UserList> getMovieLists(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
public ResultList<UserList> getMovieLists(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
return tmdbMovies.getMovieLists(movieId, page, language, appendToResponse);
}
@@ -1080,7 +1080,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getUpcoming(Integer page, String language) throws MovieDbException {
public ResultList<MovieInfo> getUpcoming(Integer page, String language) throws MovieDbException {
return tmdbMovies.getUpcoming(page, language);
}
@@ -1095,7 +1095,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getNowPlayingMovies(Integer page, String language) throws MovieDbException {
public ResultList<MovieInfo> getNowPlayingMovies(Integer page, String language) throws MovieDbException {
return tmdbMovies.getNowPlayingMovies(page, language);
}
@@ -1109,7 +1109,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getPopularMovieList(Integer page, String language) throws MovieDbException {
public ResultList<MovieInfo> getPopularMovieList(Integer page, String language) throws MovieDbException {
return tmdbMovies.getPopularMovieList(page, language);
}
@@ -1124,7 +1124,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getTopRatedMovies(Integer page, String language) throws MovieDbException {
public ResultList<MovieInfo> getTopRatedMovies(Integer page, String language) throws MovieDbException {
return tmdbMovies.getTopRatedMovies(page, language);
}
//</editor-fold>
@@ -1226,7 +1226,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Artwork> getPersonImages(int personId) throws MovieDbException {
public ResultList<Artwork> getPersonImages(int personId) throws MovieDbException {
return tmdbPeople.getPersonImages(personId);
}
@@ -1242,7 +1242,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<ArtworkMedia> getPersonTaggedImages(int personId, Integer page, String language) throws MovieDbException {
public ResultList<ArtworkMedia> getPersonTaggedImages(int personId, Integer page, String language) throws MovieDbException {
return tmdbPeople.getPersonTaggedImages(personId, page, language);
}
@@ -1277,7 +1277,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<PersonFind> getPersonPopular(Integer page) throws MovieDbException {
public ResultList<PersonFind> getPersonPopular(Integer page) throws MovieDbException {
return tmdbPeople.getPersonPopular(page);
}
@@ -1317,7 +1317,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Company> searchCompanies(String query, Integer page) throws MovieDbException {
public ResultList<Company> searchCompanies(String query, Integer page) throws MovieDbException {
return tmdbSearch.searchCompanies(query, page);
}
@@ -1330,7 +1330,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Collection> searchCollection(String query, Integer page, String language) throws MovieDbException {
public ResultList<Collection> searchCollection(String query, Integer page, String language) throws MovieDbException {
return tmdbSearch.searchCollection(query, page, language);
}
@@ -1342,7 +1342,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Keyword> searchKeyword(String query, Integer page) throws MovieDbException {
public ResultList<Keyword> searchKeyword(String query, Integer page) throws MovieDbException {
return tmdbSearch.searchKeyword(query, page);
}
@@ -1355,7 +1355,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<UserList> searchList(String query, Integer page, Boolean includeAdult) throws MovieDbException {
public ResultList<UserList> searchList(String query, Integer page, Boolean includeAdult) throws MovieDbException {
return tmdbSearch.searchList(query, page, includeAdult);
}
@@ -1375,7 +1375,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> searchMovie(String query,
public ResultList<MovieInfo> searchMovie(String query,
Integer page,
String language,
Boolean includeAdult,
@@ -1401,7 +1401,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MediaBasic> searchMulti(String query, Integer page, String language, Boolean includeAdult) throws MovieDbException {
public ResultList<MediaBasic> searchMulti(String query, Integer page, String language, Boolean includeAdult) throws MovieDbException {
return tmdbSearch.searchMulti(query, page, language, includeAdult);
}
@@ -1418,7 +1418,7 @@ public class TheMovieDbApi {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<PersonFind> searchPeople(String query, Integer page, Boolean includeAdult, SearchType searchType) throws MovieDbException {
public ResultList<PersonFind> searchPeople(String query, Integer page, Boolean includeAdult, SearchType searchType) throws MovieDbException {
return tmdbSearch.searchPeople(query, page, includeAdult, searchType);
}
@@ -1433,7 +1433,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> searchTV(String query, Integer page, String language, Integer firstAirDateYear, SearchType searchType) throws MovieDbException {
public ResultList<TVBasic> searchTV(String query, Integer page, String language, Integer firstAirDateYear, SearchType searchType) throws MovieDbException {
return tmdbSearch.searchTV(query, page, language, firstAirDateYear, searchType);
}
//</editor-fold>
@@ -1474,7 +1474,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<AlternativeTitle> getTVAlternativeTitles(int tvID) throws MovieDbException {
public ResultList<AlternativeTitle> getTVAlternativeTitles(int tvID) throws MovieDbException {
return tmdbTv.getTVAlternativeTitles(tvID);
}
@@ -1498,7 +1498,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<ContentRating> getTVContentRatings(int tvID) throws MovieDbException {
public ResultList<ContentRating> getTVContentRatings(int tvID) throws MovieDbException {
return tmdbTv.getTVContentRatings(tvID);
}
@@ -1536,7 +1536,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<Artwork> getTVImages(int tvID, String language, String... includeImageLanguage) throws MovieDbException {
public ResultList<Artwork> getTVImages(int tvID, String language, String... includeImageLanguage) throws MovieDbException {
return tmdbTv.getTVImages(tvID, language, includeImageLanguage);
}
@@ -1548,7 +1548,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<Keyword> getTVKeywords(int tvID, String... appendToResponse) throws MovieDbException {
public ResultList<Keyword> getTVKeywords(int tvID, String... appendToResponse) throws MovieDbException {
return tmdbTv.getTVKeywords(tvID, appendToResponse);
}
@@ -1578,7 +1578,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVInfo> getTVSimilar(int tvID, Integer page, String language, String... appendToResponse) throws MovieDbException {
public ResultList<TVInfo> getTVSimilar(int tvID, Integer page, String language, String... appendToResponse) throws MovieDbException {
return tmdbTv.getTVSimilar(tvID, page, language, appendToResponse);
}
@@ -1590,7 +1590,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<Translation> getTVTranslations(int tvID) throws MovieDbException {
public ResultList<Translation> getTVTranslations(int tvID) throws MovieDbException {
return tmdbTv.getTVTranslations(tvID);
}
@@ -1603,7 +1603,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<Video> getTVVideos(int tvID, String language) throws MovieDbException {
public ResultList<Video> getTVVideos(int tvID, String language) throws MovieDbException {
return tmdbTv.getTVVideos(tvID, language);
}
@@ -1628,7 +1628,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> getTVOnTheAir(Integer page, String language) throws MovieDbException {
public ResultList<TVBasic> getTVOnTheAir(Integer page, String language) throws MovieDbException {
return tmdbTv.getTVOnTheAir(page, language);
}
@@ -1643,7 +1643,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> getTVAiringToday(Integer page, String language, String timezone) throws MovieDbException {
public ResultList<TVBasic> getTVAiringToday(Integer page, String language, String timezone) throws MovieDbException {
return tmdbTv.getTVAiringToday(page, language, timezone);
}
@@ -1660,7 +1660,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> getTVTopRated(Integer page, String language) throws MovieDbException {
public ResultList<TVBasic> getTVTopRated(Integer page, String language) throws MovieDbException {
return tmdbTv.getTVTopRated(page, language);
}
@@ -1672,7 +1672,7 @@ public class TheMovieDbApi {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> getTVPopular(Integer page, String language) throws MovieDbException {
public ResultList<TVBasic> getTVPopular(Integer page, String language) throws MovieDbException {
return tmdbTv.getTVPopular(page, language);
}
@@ -27,7 +27,7 @@ import com.omertron.themoviedbapi.model.account.Account;
import com.omertron.themoviedbapi.model.list.UserList;
import com.omertron.themoviedbapi.model.movie.MovieBasic;
import com.omertron.themoviedbapi.model.tv.TVBasic;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -105,7 +105,7 @@ public class TmdbAccount extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getFavoriteMovies(String sessionId, int accountId) throws MovieDbException {
public ResultList<MovieBasic> getFavoriteMovies(String sessionId, int accountId) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.SESSION_ID, sessionId);
parameters.add(Param.ID, accountId);
@@ -123,7 +123,7 @@ public class TmdbAccount extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<TVBasic> getFavoriteTv(String sessionId, int accountId) throws MovieDbException {
public ResultList<TVBasic> getFavoriteTv(String sessionId, int accountId) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.SESSION_ID, sessionId);
parameters.add(Param.ID, accountId);
@@ -176,7 +176,7 @@ public class TmdbAccount extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getRatedMovies(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
public ResultList<MovieBasic> getRatedMovies(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.SESSION_ID, sessionId);
parameters.add(Param.ID, accountId);
@@ -200,7 +200,7 @@ public class TmdbAccount extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<TVBasic> getRatedTV(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
public ResultList<TVBasic> getRatedTV(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.SESSION_ID, sessionId);
parameters.add(Param.ID, accountId);
@@ -224,7 +224,7 @@ public class TmdbAccount extends AbstractMethod {
* @return The watch list of the user
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getWatchListMovie(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
public ResultList<MovieBasic> getWatchListMovie(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.SESSION_ID, sessionId);
parameters.add(Param.ID, accountId);
@@ -248,7 +248,7 @@ public class TmdbAccount extends AbstractMethod {
* @return The watch list of the user
* @throws MovieDbException
*/
public TmdbResultsList<TVBasic> getWatchListTV(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
public ResultList<TVBasic> getWatchListTV(String sessionId, int accountId, Integer page, String sortBy, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.SESSION_ID, sessionId);
parameters.add(Param.ID, accountId);
@@ -303,7 +303,7 @@ public class TmdbAccount extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getGuestRatedMovies(String guestSessionId, String language, Integer page, SortBy sortBy) throws MovieDbException {
public ResultList<MovieBasic> getGuestRatedMovies(String guestSessionId, String language, Integer page, SortBy sortBy) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, guestSessionId);
parameters.add(Param.LANGUAGE, language);
@@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.change.ChangeListItem;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -60,7 +60,7 @@ public class TmdbChanges extends AbstractMethod {
* @return List of changed movie
* @throws MovieDbException
*/
public TmdbResultsList<ChangeListItem> getChangeList(MethodBase method, Integer page, String startDate, String endDate) throws MovieDbException {
public ResultList<ChangeListItem> getChangeList(MethodBase method, Integer page, String startDate, String endDate) throws MovieDbException {
TmdbParameters params = new TmdbParameters();
params.add(Param.PAGE, page);
params.add(Param.START_DATE, startDate);
@@ -23,7 +23,7 @@ import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.artwork.Artwork;
import com.omertron.themoviedbapi.enumeration.ArtworkType;
import com.omertron.themoviedbapi.model.collection.CollectionInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -87,7 +87,7 @@ public class TmdbCollections extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Artwork> getCollectionImages(int collectionId, String language) throws MovieDbException {
public ResultList<Artwork> getCollectionImages(int collectionId, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, collectionId);
parameters.add(Param.LANGUAGE, language);
@@ -97,7 +97,7 @@ public class TmdbCollections extends AbstractMethod {
try {
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
TmdbResultsList<Artwork> results = new TmdbResultsList<Artwork>(wrapper.getAll(ArtworkType.POSTER, ArtworkType.BACKDROP));
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll(ArtworkType.POSTER, ArtworkType.BACKDROP));
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -24,7 +24,7 @@ import com.omertron.themoviedbapi.MovieDbException;
import static com.omertron.themoviedbapi.methods.AbstractMethod.MAPPER;
import com.omertron.themoviedbapi.model.config.Configuration;
import com.omertron.themoviedbapi.model.config.JobDepartment;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -89,13 +89,13 @@ public class TmdbConfiguration extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<JobDepartment> getJobs() throws MovieDbException {
public ResultList<JobDepartment> getJobs() throws MovieDbException {
URL url = new ApiUrl(apiKey, MethodBase.JOB).subMethod(MethodSub.LIST).buildUrl();
String webpage = httpTools.getRequest(url);
try {
WrapperJobList wrapper = MAPPER.readValue(webpage, WrapperJobList.class);
TmdbResultsList<JobDepartment> results = new TmdbResultsList<JobDepartment>(wrapper.getJobs());
ResultList<JobDepartment> results = new ResultList<JobDepartment>(wrapper.getJobs());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Genre;
import com.omertron.themoviedbapi.model.movie.MovieBasic;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -59,7 +59,7 @@ public class TmdbGenres extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Genre> getGenreMovieList(String language) throws MovieDbException {
public ResultList<Genre> getGenreMovieList(String language) throws MovieDbException {
return getGenreList(language, MethodSub.MOVIE_LIST);
}
@@ -70,7 +70,7 @@ public class TmdbGenres extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Genre> getGenreTVList(String language) throws MovieDbException {
public ResultList<Genre> getGenreTVList(String language) throws MovieDbException {
return getGenreList(language, MethodSub.TV_LIST);
}
@@ -81,7 +81,7 @@ public class TmdbGenres extends AbstractMethod {
* @return
* @throws MovieDbException
*/
private TmdbResultsList<Genre> getGenreList(String language, MethodSub sub) throws MovieDbException {
private ResultList<Genre> getGenreList(String language, MethodSub sub) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.LANGUAGE, language);
@@ -90,7 +90,7 @@ public class TmdbGenres extends AbstractMethod {
try {
WrapperGenres wrapper = MAPPER.readValue(webpage, WrapperGenres.class);
TmdbResultsList<Genre> results = new TmdbResultsList<Genre>(wrapper.getGenres());
ResultList<Genre> results = new ResultList<Genre>(wrapper.getGenres());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.movie.MovieBasic;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -82,7 +82,7 @@ public class TmdbKeywords extends AbstractMethod {
* @return List of movies with the keyword
* @throws MovieDbException
*/
public TmdbResultsList<MovieBasic> getKeywordMovies(String keywordId, String language, Integer page) throws MovieDbException {
public ResultList<MovieBasic> getKeywordMovies(String keywordId, String language, Integer page) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, keywordId);
parameters.add(Param.LANGUAGE, language);
@@ -33,7 +33,7 @@ import com.omertron.themoviedbapi.model.movie.ReleaseInfo;
import com.omertron.themoviedbapi.model.media.Translation;
import com.omertron.themoviedbapi.model.media.Video;
import com.omertron.themoviedbapi.model.review.Review;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -176,7 +176,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<AlternativeTitle> getMovieAlternativeTitles(int movieId, String country, String... appendToResponse) throws MovieDbException {
public ResultList<AlternativeTitle> getMovieAlternativeTitles(int movieId, String country, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.COUNTRY, country);
@@ -186,7 +186,7 @@ public class TmdbMovies extends AbstractMethod {
String webpage = httpTools.getRequest(url);
try {
WrapperAlternativeTitles wrapper = MAPPER.readValue(webpage, WrapperAlternativeTitles.class);
TmdbResultsList<AlternativeTitle> results = new TmdbResultsList<AlternativeTitle>(wrapper.getTitles());
ResultList<AlternativeTitle> results = new ResultList<AlternativeTitle>(wrapper.getTitles());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -226,7 +226,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Artwork> getMovieImages(int movieId, String language, String... appendToResponse) throws MovieDbException {
public ResultList<Artwork> getMovieImages(int movieId, String language, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.LANGUAGE, language);
@@ -237,7 +237,7 @@ public class TmdbMovies extends AbstractMethod {
try {
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
TmdbResultsList<Artwork> results = new TmdbResultsList<Artwork>(wrapper.getAll());
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -256,7 +256,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Keyword> getMovieKeywords(int movieId, String... appendToResponse) throws MovieDbException {
public ResultList<Keyword> getMovieKeywords(int movieId, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.APPEND, appendToResponse);
@@ -266,7 +266,7 @@ public class TmdbMovies extends AbstractMethod {
try {
WrapperMovieKeywords wrapper = MAPPER.readValue(webpage, WrapperMovieKeywords.class);
TmdbResultsList<Keyword> results = new TmdbResultsList<Keyword>(wrapper.getKeywords());
ResultList<Keyword> results = new ResultList<Keyword>(wrapper.getKeywords());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -284,7 +284,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<ReleaseInfo> getMovieReleaseInfo(int movieId, String language, String... appendToResponse) throws MovieDbException {
public ResultList<ReleaseInfo> getMovieReleaseInfo(int movieId, String language, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.LANGUAGE, language);
@@ -295,7 +295,7 @@ public class TmdbMovies extends AbstractMethod {
try {
WrapperReleaseInfo wrapper = MAPPER.readValue(webpage, WrapperReleaseInfo.class);
TmdbResultsList<ReleaseInfo> results = new TmdbResultsList<ReleaseInfo>(wrapper.getCountries());
ResultList<ReleaseInfo> results = new ResultList<ReleaseInfo>(wrapper.getCountries());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -315,7 +315,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Video> getMovieVideos(int movieId, String language, String... appendToResponse) throws MovieDbException {
public ResultList<Video> getMovieVideos(int movieId, String language, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.LANGUAGE, language);
@@ -326,7 +326,7 @@ public class TmdbMovies extends AbstractMethod {
try {
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
TmdbResultsList<Video> results = new TmdbResultsList<Video>(wrapper.getVideos());
ResultList<Video> results = new ResultList<Video>(wrapper.getVideos());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -343,7 +343,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Translation> getMovieTranslations(int movieId, String... appendToResponse) throws MovieDbException {
public ResultList<Translation> getMovieTranslations(int movieId, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.APPEND, appendToResponse);
@@ -353,7 +353,7 @@ public class TmdbMovies extends AbstractMethod {
try {
WrapperTranslations wrapper = MAPPER.readValue(webpage, WrapperTranslations.class);
TmdbResultsList<Translation> results = new TmdbResultsList<Translation>(wrapper.getTranslations());
ResultList<Translation> results = new ResultList<Translation>(wrapper.getTranslations());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -377,7 +377,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getSimilarMovies(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
public ResultList<MovieInfo> getSimilarMovies(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.LANGUAGE, language);
@@ -399,7 +399,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Review> getMovieReviews(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
public ResultList<Review> getMovieReviews(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.PAGE, page);
@@ -421,7 +421,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<UserList> getMovieLists(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
public ResultList<UserList> getMovieLists(int movieId, Integer page, String language, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, movieId);
parameters.add(Param.LANGUAGE, language);
@@ -532,7 +532,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getUpcoming(Integer page, String language) throws MovieDbException {
public ResultList<MovieInfo> getUpcoming(Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.LANGUAGE, language);
parameters.add(Param.PAGE, page);
@@ -553,7 +553,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getNowPlayingMovies(Integer page, String language) throws MovieDbException {
public ResultList<MovieInfo> getNowPlayingMovies(Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.LANGUAGE, language);
parameters.add(Param.PAGE, page);
@@ -573,7 +573,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getPopularMovieList(Integer page, String language) throws MovieDbException {
public ResultList<MovieInfo> getPopularMovieList(Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.LANGUAGE, language);
parameters.add(Param.PAGE, page);
@@ -594,7 +594,7 @@ public class TmdbMovies extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> getTopRatedMovies(Integer page, String language) throws MovieDbException {
public ResultList<MovieInfo> getTopRatedMovies(Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.LANGUAGE, language);
parameters.add(Param.PAGE, page);
@@ -33,7 +33,7 @@ import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.model.person.PersonCredits;
import com.omertron.themoviedbapi.model.person.PersonCreditsMixIn;
import com.omertron.themoviedbapi.model.person.PersonFind;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -210,7 +210,7 @@ public class TmdbPeople extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Artwork> getPersonImages(int personId) throws MovieDbException {
public ResultList<Artwork> getPersonImages(int personId) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, personId);
@@ -219,7 +219,7 @@ public class TmdbPeople extends AbstractMethod {
try {
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
TmdbResultsList<Artwork> results = new TmdbResultsList<Artwork>(wrapper.getAll(ArtworkType.PROFILE));
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll(ArtworkType.PROFILE));
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -239,7 +239,7 @@ public class TmdbPeople extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<ArtworkMedia> getPersonTaggedImages(int personId, Integer page, String language) throws MovieDbException {
public ResultList<ArtworkMedia> getPersonTaggedImages(int personId, Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, personId);
parameters.add(Param.PAGE, page);
@@ -293,7 +293,7 @@ public class TmdbPeople extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<PersonFind> getPersonPopular(Integer page) throws MovieDbException {
public ResultList<PersonFind> getPersonPopular(Integer page) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.PAGE, page);
@@ -30,7 +30,7 @@ import com.omertron.themoviedbapi.model.media.MediaBasic;
import com.omertron.themoviedbapi.model.movie.MovieInfo;
import com.omertron.themoviedbapi.model.person.PersonFind;
import com.omertron.themoviedbapi.model.tv.TVBasic;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -73,7 +73,7 @@ public class TmdbSearch extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Company> searchCompanies(String query, Integer page) throws MovieDbException {
public ResultList<Company> searchCompanies(String query, Integer page) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.PAGE, page);
@@ -92,7 +92,7 @@ public class TmdbSearch extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Collection> searchCollection(String query, Integer page, String language) throws MovieDbException {
public ResultList<Collection> searchCollection(String query, Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.PAGE, page);
@@ -111,7 +111,7 @@ public class TmdbSearch extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Keyword> searchKeyword(String query, Integer page) throws MovieDbException {
public ResultList<Keyword> searchKeyword(String query, Integer page) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.PAGE, page);
@@ -130,7 +130,7 @@ public class TmdbSearch extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<UserList> searchList(String query, Integer page, Boolean includeAdult) throws MovieDbException {
public ResultList<UserList> searchList(String query, Integer page, Boolean includeAdult) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.PAGE, page);
@@ -154,7 +154,7 @@ public class TmdbSearch extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MovieInfo> searchMovie(String query,
public ResultList<MovieInfo> searchMovie(String query,
Integer page,
String language,
Boolean includeAdult,
@@ -191,7 +191,7 @@ public class TmdbSearch extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<MediaBasic> searchMulti(String query, Integer page, String language, Boolean includeAdult) throws MovieDbException {
public ResultList<MediaBasic> searchMulti(String query, Integer page, String language, Boolean includeAdult) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.PAGE, page);
@@ -203,7 +203,7 @@ public class TmdbSearch extends AbstractMethod {
try {
WrapperMultiSearch wrapper = MAPPER.readValue(webpage, WrapperMultiSearch.class);
TmdbResultsList<MediaBasic> results = new TmdbResultsList<MediaBasic>(null);
ResultList<MediaBasic> results = new ResultList<MediaBasic>(null);
results.getResults().addAll(wrapper.getResults());
results.copyWrapper(wrapper);
return results;
@@ -223,7 +223,7 @@ public class TmdbSearch extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<PersonFind> searchPeople(String query, Integer page, Boolean includeAdult, SearchType searchType) throws MovieDbException {
public ResultList<PersonFind> searchPeople(String query, Integer page, Boolean includeAdult, SearchType searchType) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.ADULT, includeAdult);
@@ -247,7 +247,7 @@ public class TmdbSearch extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> searchTV(String query, Integer page, String language, Integer firstAirDateYear, SearchType searchType) throws MovieDbException {
public ResultList<TVBasic> searchTV(String query, Integer page, String language, Integer firstAirDateYear, SearchType searchType) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.PAGE, page);
@@ -33,7 +33,7 @@ import com.omertron.themoviedbapi.model.person.ContentRating;
import com.omertron.themoviedbapi.model.person.ExternalID;
import com.omertron.themoviedbapi.model.tv.TVBasic;
import com.omertron.themoviedbapi.model.tv.TVInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -128,7 +128,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<AlternativeTitle> getTVAlternativeTitles(int tvID) throws MovieDbException {
public ResultList<AlternativeTitle> getTVAlternativeTitles(int tvID) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
@@ -169,7 +169,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<ContentRating> getTVContentRatings(int tvID) throws MovieDbException {
public ResultList<ContentRating> getTVContentRatings(int tvID) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
@@ -234,7 +234,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<Artwork> getTVImages(int tvID, String language, String... includeImageLanguage) throws MovieDbException {
public ResultList<Artwork> getTVImages(int tvID, String language, String... includeImageLanguage) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.LANGUAGE, language);
@@ -245,7 +245,7 @@ public class TmdbTV extends AbstractMethod {
try {
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
TmdbResultsList<Artwork> results = new TmdbResultsList<Artwork>(wrapper.getAll());
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -261,7 +261,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<Keyword> getTVKeywords(int tvID, String... appendToResponse) throws MovieDbException {
public ResultList<Keyword> getTVKeywords(int tvID, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.APPEND, appendToResponse);
@@ -316,7 +316,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVInfo> getTVSimilar(int tvID, Integer page, String language, String... appendToResponse) throws MovieDbException {
public ResultList<TVInfo> getTVSimilar(int tvID, Integer page, String language, String... appendToResponse) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.PAGE, page);
@@ -336,7 +336,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<Translation> getTVTranslations(int tvID) throws MovieDbException {
public ResultList<Translation> getTVTranslations(int tvID) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
@@ -345,7 +345,7 @@ public class TmdbTV extends AbstractMethod {
try {
WrapperTranslations wrapper = MAPPER.readValue(webpage, WrapperTranslations.class);
TmdbResultsList<Translation> results = new TmdbResultsList<Translation>(wrapper.getTranslations());
ResultList<Translation> results = new ResultList<Translation>(wrapper.getTranslations());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -362,7 +362,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<Video> getTVVideos(int tvID, String language) throws MovieDbException {
public ResultList<Video> getTVVideos(int tvID, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.LANGUAGE, language);
@@ -372,7 +372,7 @@ public class TmdbTV extends AbstractMethod {
try {
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
TmdbResultsList<Video> results = new TmdbResultsList<Video>(wrapper.getVideos());
ResultList<Video> results = new ResultList<Video>(wrapper.getVideos());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -408,7 +408,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> getTVOnTheAir(Integer page, String language) throws MovieDbException {
public ResultList<TVBasic> getTVOnTheAir(Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.PAGE, page);
parameters.add(Param.LANGUAGE, language);
@@ -429,7 +429,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> getTVAiringToday(Integer page, String language, String timezone) throws MovieDbException {
public ResultList<TVBasic> getTVAiringToday(Integer page, String language, String timezone) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.PAGE, page);
parameters.add(Param.LANGUAGE, language);
@@ -453,7 +453,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> getTVTopRated(Integer page, String language) throws MovieDbException {
public ResultList<TVBasic> getTVTopRated(Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.PAGE, page);
parameters.add(Param.LANGUAGE, language);
@@ -471,7 +471,7 @@ public class TmdbTV extends AbstractMethod {
* @return
* @throws com.omertron.themoviedbapi.MovieDbException
*/
public TmdbResultsList<TVBasic> getTVPopular(Integer page, String language) throws MovieDbException {
public ResultList<TVBasic> getTVPopular(Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.PAGE, page);
parameters.add(Param.LANGUAGE, language);
@@ -28,7 +28,7 @@ import com.omertron.themoviedbapi.model.media.MediaState;
import com.omertron.themoviedbapi.model.media.Video;
import com.omertron.themoviedbapi.model.person.ExternalID;
import com.omertron.themoviedbapi.model.tv.TVEpisodeInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -212,7 +212,7 @@ public class TmdbTVEpisodes extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Artwork> getEpisodeImages(int tvID, int seasonNumber, int episodeNumber) throws MovieDbException {
public ResultList<Artwork> getEpisodeImages(int tvID, int seasonNumber, int episodeNumber) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.SEASON_NUMBER, seasonNumber);
@@ -223,7 +223,7 @@ public class TmdbTVEpisodes extends AbstractMethod {
try {
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
TmdbResultsList<Artwork> results = new TmdbResultsList<Artwork>(wrapper.getAll());
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -280,7 +280,7 @@ public class TmdbTVEpisodes extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Video> getEpisodeVideos(int tvID, int seasonNumber, int episodeNumber, String language) throws MovieDbException {
public ResultList<Video> getEpisodeVideos(int tvID, int seasonNumber, int episodeNumber, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.SEASON_NUMBER, seasonNumber);
@@ -292,7 +292,7 @@ public class TmdbTVEpisodes extends AbstractMethod {
try {
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
TmdbResultsList<Video> results = new TmdbResultsList<Video>(wrapper.getVideos());
ResultList<Video> results = new ResultList<Video>(wrapper.getVideos());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -27,7 +27,7 @@ import com.omertron.themoviedbapi.model.media.MediaState;
import com.omertron.themoviedbapi.model.media.Video;
import com.omertron.themoviedbapi.model.person.ExternalID;
import com.omertron.themoviedbapi.model.tv.TVSeasonInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;
import com.omertron.themoviedbapi.tools.MethodBase;
@@ -194,7 +194,7 @@ public class TmdbTVSeasons extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Artwork> getSeasonImages(int tvID, int seasonNumber, String language, String... includeImageLanguage) throws MovieDbException {
public ResultList<Artwork> getSeasonImages(int tvID, int seasonNumber, String language, String... includeImageLanguage) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.SEASON_NUMBER, seasonNumber);
@@ -206,7 +206,7 @@ public class TmdbTVSeasons extends AbstractMethod {
try {
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
TmdbResultsList<Artwork> results = new TmdbResultsList<Artwork>(wrapper.getAll());
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -224,7 +224,7 @@ public class TmdbTVSeasons extends AbstractMethod {
* @return
* @throws MovieDbException
*/
public TmdbResultsList<Video> getSeasonVideos(int tvID, int seasonNumber, String language) throws MovieDbException {
public ResultList<Video> getSeasonVideos(int tvID, int seasonNumber, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.SEASON_NUMBER, seasonNumber);
@@ -235,7 +235,7 @@ public class TmdbTVSeasons extends AbstractMethod {
try {
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
TmdbResultsList<Video> results = new TmdbResultsList<Video>(wrapper.getVideos());
ResultList<Video> results = new ResultList<Video>(wrapper.getVideos());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
@@ -28,11 +28,11 @@ import java.util.List;
* @author Stuart
* @param <T>
*/
public final class TmdbResultsList<T> extends AbstractResults {
public final class ResultList<T> extends AbstractResults {
private List<T> results;
public TmdbResultsList(List<T> resultList) {
public ResultList(List<T> resultList) {
if (resultList != null) {
results = new ArrayList<T>(resultList);
} else {
@@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import java.io.Serializable;
import java.util.List;
@@ -45,8 +45,8 @@ public class WrapperGenericList<T> extends AbstractWrapperAll implements Seriali
this.results = results;
}
public TmdbResultsList<T> getTmdbResultsList() {
TmdbResultsList<T> resultsList = new TmdbResultsList<T>(results);
public ResultList<T> getTmdbResultsList() {
ResultList<T> resultsList = new ResultList<T>(results);
resultsList.copyWrapper(this);
return resultsList;
}
@@ -29,7 +29,7 @@ import com.omertron.themoviedbapi.model.account.Account;
import com.omertron.themoviedbapi.model.list.UserList;
import com.omertron.themoviedbapi.model.movie.MovieBasic;
import com.omertron.themoviedbapi.model.tv.TVBasic;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.TimeUnit;
@@ -113,7 +113,7 @@ public class TmdbAccountTest extends AbstractTests {
@Test
public void testGetFavoriteMovies() throws MovieDbException {
LOG.info("getFavoriteMovies");
TmdbResultsList<MovieBasic> results = instance.getFavoriteMovies(getSessionId(), getAccountId());
ResultList<MovieBasic> results = instance.getFavoriteMovies(getSessionId(), getAccountId());
assertFalse("No entries found", results.isEmpty());
for (MovieBasic result : results.getResults()) {
TestSuite.test(result);
@@ -128,7 +128,7 @@ public class TmdbAccountTest extends AbstractTests {
@Test
public void testGetFavoriteTv() throws MovieDbException {
LOG.info("getFavoriteTv");
TmdbResultsList<TVBasic> results = instance.getFavoriteTv(getSessionId(), getAccountId());
ResultList<TVBasic> results = instance.getFavoriteTv(getSessionId(), getAccountId());
assertFalse("No entries found", results.isEmpty());
for (TVBasic result : results.getResults()) {
TestSuite.test(result);
@@ -173,7 +173,7 @@ public class TmdbAccountTest extends AbstractTests {
@Test
public void testGetRatedMovies() throws MovieDbException {
LOG.info("getRatedMovies");
TmdbResultsList<MovieBasic> results = instance.getRatedMovies(getSessionId(), getAccountId(), null, null, null);
ResultList<MovieBasic> results = instance.getRatedMovies(getSessionId(), getAccountId(), null, null, null);
assertFalse("No entries found", results.isEmpty());
}
@@ -185,7 +185,7 @@ public class TmdbAccountTest extends AbstractTests {
@Test
public void testGetRatedTV() throws MovieDbException {
LOG.info("getRatedTV");
TmdbResultsList<TVBasic> results = instance.getRatedTV(getSessionId(), getAccountId(), null, null, null);
ResultList<TVBasic> results = instance.getRatedTV(getSessionId(), getAccountId(), null, null, null);
assertFalse("No entries found", results.isEmpty());
for (TVBasic result : results.getResults()) {
TestSuite.test(result);
@@ -200,7 +200,7 @@ public class TmdbAccountTest extends AbstractTests {
@Test
public void testGetWatchListMovie() throws MovieDbException {
LOG.info("getWatchListMovie");
TmdbResultsList<MovieBasic> results = instance.getWatchListMovie(getSessionId(), getAccountId(), null, null, null);
ResultList<MovieBasic> results = instance.getWatchListMovie(getSessionId(), getAccountId(), null, null, null);
assertNotNull("No rated list found", results);
assertFalse("No entries found", results.isEmpty());
for (MovieBasic result : results.getResults()) {
@@ -216,7 +216,7 @@ public class TmdbAccountTest extends AbstractTests {
@Test
public void testGetWatchListTV() throws MovieDbException {
LOG.info("getWatchListTV");
TmdbResultsList<TVBasic> results = instance.getWatchListTV(getSessionId(), getAccountId(), null, null, null);
ResultList<TVBasic> results = instance.getWatchListTV(getSessionId(), getAccountId(), null, null, null);
assertNotNull("No rated list found", results);
assertFalse("No entries found", results.isEmpty());
for (TVBasic result : results.getResults()) {
@@ -269,7 +269,7 @@ public class TmdbAccountTest extends AbstractTests {
String language = LANGUAGE_DEFAULT;
Integer page = null;
SortBy sortBy = SortBy.CREATED_AT_ASC;
TmdbResultsList<MovieBasic> result = instance.getGuestRatedMovies(guestSession, language, page, sortBy);
ResultList<MovieBasic> result = instance.getGuestRatedMovies(guestSession, language, page, sortBy);
// Check and post some ratings if required
if (result.isEmpty()) {
@@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.change.ChangeListItem;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.MethodBase;
import org.junit.AfterClass;
import static org.junit.Assert.assertFalse;
@@ -59,7 +59,7 @@ public class TmdbChangesTest extends AbstractTests {
@Test
public void testGetMovieChangesList() throws MovieDbException {
LOG.info("getMovieChangesList");
TmdbResultsList<ChangeListItem> result = instance.getChangeList(MethodBase.MOVIE, null, null, null);
ResultList<ChangeListItem> result = instance.getChangeList(MethodBase.MOVIE, null, null, null);
assertFalse("No movie changes.", result.isEmpty());
}
@@ -71,7 +71,7 @@ public class TmdbChangesTest extends AbstractTests {
@Ignore("Not ready yet")
public void testGetPersonChangesList() throws MovieDbException {
LOG.info("getPersonChangesList");
TmdbResultsList<ChangeListItem> result = instance.getChangeList(MethodBase.PERSON, null, null, null);
ResultList<ChangeListItem> result = instance.getChangeList(MethodBase.PERSON, null, null, null);
assertFalse("No Person changes.", result.isEmpty());
}
@@ -83,7 +83,7 @@ public class TmdbChangesTest extends AbstractTests {
@Ignore("Not ready yet")
public void testGetTVChangesList() throws MovieDbException {
LOG.info("getPersonChangesList");
TmdbResultsList<ChangeListItem> result = instance.getChangeList(MethodBase.PERSON, null, null, null);
ResultList<ChangeListItem> result = instance.getChangeList(MethodBase.PERSON, null, null, null);
assertFalse("No TV changes.", result.isEmpty());
}
}
@@ -23,7 +23,7 @@ import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.artwork.Artwork;
import com.omertron.themoviedbapi.model.collection.CollectionInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import org.junit.AfterClass;
import static org.junit.Assert.assertFalse;
import org.junit.BeforeClass;
@@ -72,7 +72,7 @@ public class TmdbCollectionsTest extends AbstractTests {
@Test
public void testGetCollectionImages() throws MovieDbException {
LOG.info("getCollectionImages");
TmdbResultsList<Artwork> result = instance.getCollectionImages(ID_COLLECTION_STAR_WARS, LANGUAGE_DEFAULT);
ResultList<Artwork> result = instance.getCollectionImages(ID_COLLECTION_STAR_WARS, LANGUAGE_DEFAULT);
assertFalse("No artwork found", result.getResults().isEmpty());
}
@@ -23,7 +23,7 @@ import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.config.Configuration;
import com.omertron.themoviedbapi.model.config.JobDepartment;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
@@ -105,7 +105,7 @@ public class TmdbConfigurationTest extends AbstractTests {
@Test
public void testGetJobs() throws MovieDbException {
LOG.info("getJobs");
TmdbResultsList<JobDepartment> result = instance.getJobs();
ResultList<JobDepartment> result = instance.getJobs();
assertNotNull("Null results", result);
assertFalse("Empty results", result.getResults().isEmpty());
assertTrue("No results", result.getResults().size() > 0);
@@ -23,7 +23,7 @@ import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Genre;
import com.omertron.themoviedbapi.model.movie.MovieBasic;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import java.util.List;
import org.junit.After;
import org.junit.AfterClass;
@@ -71,7 +71,7 @@ public class TmdbGenresTest extends AbstractTests {
@Test
public void testGetGenreMovieList() throws MovieDbException {
LOG.info("getGenreMovieList");
TmdbResultsList<Genre> result = instance.getGenreMovieList(LANGUAGE_DEFAULT);
ResultList<Genre> result = instance.getGenreMovieList(LANGUAGE_DEFAULT);
assertNotNull("List is null", result.getResults());
assertFalse("List is empty", result.getResults().isEmpty());
}
@@ -84,7 +84,7 @@ public class TmdbGenresTest extends AbstractTests {
@Test
public void testGetGenreTVList() throws MovieDbException {
LOG.info("getGenreTVList");
TmdbResultsList<Genre> result = instance.getGenreTVList(LANGUAGE_DEFAULT);
ResultList<Genre> result = instance.getGenreTVList(LANGUAGE_DEFAULT);
assertNotNull("List is null", result.getResults());
assertFalse("List is empty", result.getResults().isEmpty());
}
@@ -23,7 +23,7 @@ import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.movie.MovieBasic;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertEquals;
@@ -83,7 +83,7 @@ public class TmdbKeywordsTest extends AbstractTests{
public void testGetKeywordMovies() throws MovieDbException {
LOG.info("getKeywordMovies");
int page = 0;
TmdbResultsList<MovieBasic> result = tmdb.getKeywordMovies(ID_KEYWORD, LANGUAGE_DEFAULT, page);
ResultList<MovieBasic> result = tmdb.getKeywordMovies(ID_KEYWORD, LANGUAGE_DEFAULT, page);
assertFalse("No keyword movies found", result.isEmpty());
}
@@ -39,7 +39,7 @@ import com.omertron.themoviedbapi.model.movie.ReleaseInfo;
import com.omertron.themoviedbapi.model.media.Translation;
import com.omertron.themoviedbapi.model.media.Video;
import com.omertron.themoviedbapi.model.review.Review;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.MethodBase;
import com.omertron.themoviedbapi.wrapper.WrapperChanges;
import java.text.SimpleDateFormat;
@@ -146,7 +146,7 @@ public class TmdbMoviesTest extends AbstractTests {
String[] appendToResponse = null;
for (TestID test : FILM_IDS) {
TmdbResultsList<AlternativeTitle> result = instance.getMovieAlternativeTitles(test.getTmdb(), country, appendToResponse);
ResultList<AlternativeTitle> result = instance.getMovieAlternativeTitles(test.getTmdb(), country, appendToResponse);
assertFalse("No alt titles", result.isEmpty());
}
}
@@ -196,7 +196,7 @@ public class TmdbMoviesTest extends AbstractTests {
ArtworkResults results = new ArtworkResults();
for (TestID test : FILM_IDS) {
TmdbResultsList<Artwork> result = instance.getMovieImages(test.getTmdb(), language, appendToResponse);
ResultList<Artwork> result = instance.getMovieImages(test.getTmdb(), language, appendToResponse);
assertFalse("No artwork", result.isEmpty());
for (Artwork artwork : result.getResults()) {
results.found(artwork.getArtworkType());
@@ -219,7 +219,7 @@ public class TmdbMoviesTest extends AbstractTests {
String[] appendToResponse = null;
for (TestID test : FILM_IDS) {
TmdbResultsList<Keyword> result = instance.getMovieKeywords(test.getTmdb(), appendToResponse);
ResultList<Keyword> result = instance.getMovieKeywords(test.getTmdb(), appendToResponse);
assertFalse("No keywords", result.isEmpty());
}
}
@@ -237,7 +237,7 @@ public class TmdbMoviesTest extends AbstractTests {
String[] appendToResponse = null;
for (TestID test : FILM_IDS) {
TmdbResultsList<ReleaseInfo> result = instance.getMovieReleaseInfo(test.getTmdb(), language, appendToResponse);
ResultList<ReleaseInfo> result = instance.getMovieReleaseInfo(test.getTmdb(), language, appendToResponse);
assertFalse("No release info", result.isEmpty());
}
}
@@ -256,7 +256,7 @@ public class TmdbMoviesTest extends AbstractTests {
boolean found = false;
for (TestID test : FILM_IDS) {
TmdbResultsList<Video> result = instance.getMovieVideos(test.getTmdb(), language, appendToResponse);
ResultList<Video> result = instance.getMovieVideos(test.getTmdb(), language, appendToResponse);
found = found || !result.isEmpty();
}
assertTrue("No videos", found);
@@ -274,7 +274,7 @@ public class TmdbMoviesTest extends AbstractTests {
String[] appendToResponse = null;
for (TestID test : FILM_IDS) {
TmdbResultsList<Translation> result = instance.getMovieTranslations(test.getTmdb(), appendToResponse);
ResultList<Translation> result = instance.getMovieTranslations(test.getTmdb(), appendToResponse);
assertFalse("No translations", result.isEmpty());
}
}
@@ -293,7 +293,7 @@ public class TmdbMoviesTest extends AbstractTests {
String[] appendToResponse = null;
for (TestID test : FILM_IDS) {
TmdbResultsList<MovieInfo> result = instance.getSimilarMovies(test.getTmdb(), page, language, appendToResponse);
ResultList<MovieInfo> result = instance.getSimilarMovies(test.getTmdb(), page, language, appendToResponse);
assertFalse("No similar movies", result.isEmpty());
}
}
@@ -316,7 +316,7 @@ public class TmdbMoviesTest extends AbstractTests {
// Has no reviews
continue;
}
TmdbResultsList<Review> result = instance.getMovieReviews(test.getTmdb(), page, language, appendToResponse);
ResultList<Review> result = instance.getMovieReviews(test.getTmdb(), page, language, appendToResponse);
assertFalse("No reviews", result.isEmpty());
}
}
@@ -335,7 +335,7 @@ public class TmdbMoviesTest extends AbstractTests {
String[] appendToResponse = null;
for (TestID test : FILM_IDS) {
TmdbResultsList<UserList> result = instance.getMovieLists(test.getTmdb(), page, language, appendToResponse);
ResultList<UserList> result = instance.getMovieLists(test.getTmdb(), page, language, appendToResponse);
assertFalse("Empty list", result.isEmpty());
assertTrue(result.getTotalResults() > 0);
}
@@ -355,7 +355,7 @@ public class TmdbMoviesTest extends AbstractTests {
int maxCheck = 5;
TmdbChanges chgs = new TmdbChanges(getApiKey(), getHttpTools());
TmdbResultsList<ChangeListItem> changeList = chgs.getChangeList(MethodBase.MOVIE, null, null, null);
ResultList<ChangeListItem> changeList = chgs.getChangeList(MethodBase.MOVIE, null, null, null);
LOG.info("Found {} changes to check, will check maximum of {}", changeList.getResults().size(), maxCheck);
int count = 1;
@@ -414,7 +414,7 @@ public class TmdbMoviesTest extends AbstractTests {
Integer page = null;
String language = LANGUAGE_DEFAULT;
TmdbResultsList<MovieInfo> result = instance.getUpcoming(page, language);
ResultList<MovieInfo> result = instance.getUpcoming(page, language);
assertFalse("No results found", result.isEmpty());
}
@@ -429,7 +429,7 @@ public class TmdbMoviesTest extends AbstractTests {
Integer page = null;
String language = LANGUAGE_DEFAULT;
TmdbResultsList<MovieInfo> result = instance.getNowPlayingMovies(page, language);
ResultList<MovieInfo> result = instance.getNowPlayingMovies(page, language);
assertFalse("No results found", result.isEmpty());
}
@@ -444,7 +444,7 @@ public class TmdbMoviesTest extends AbstractTests {
Integer page = null;
String language = LANGUAGE_DEFAULT;
TmdbResultsList<MovieInfo> result = instance.getPopularMovieList(page, language);
ResultList<MovieInfo> result = instance.getPopularMovieList(page, language);
assertFalse("No results found", result.isEmpty());
}
@@ -459,7 +459,7 @@ public class TmdbMoviesTest extends AbstractTests {
Integer page = null;
String language = LANGUAGE_DEFAULT;
TmdbResultsList<MovieInfo> result = instance.getTopRatedMovies(page, language);
ResultList<MovieInfo> result = instance.getTopRatedMovies(page, language);
assertFalse("No results found", result.isEmpty());
}
@@ -35,7 +35,7 @@ import com.omertron.themoviedbapi.model.person.ExternalID;
import com.omertron.themoviedbapi.model.person.Person;
import com.omertron.themoviedbapi.model.person.PersonCredits;
import com.omertron.themoviedbapi.model.person.PersonFind;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.MethodBase;
import com.omertron.themoviedbapi.wrapper.WrapperChanges;
import java.text.SimpleDateFormat;
@@ -225,7 +225,7 @@ public class TmdbPeopleTest extends AbstractTests {
LOG.info("getPersonImages");
for (TestID test : testIDs) {
TmdbResultsList<Artwork> result = instance.getPersonImages(test.getTmdb());
ResultList<Artwork> result = instance.getPersonImages(test.getTmdb());
assertFalse("No artwork", result.isEmpty());
assertEquals("Wrong artwork type", ArtworkType.PROFILE, result.getResults().get(0).getArtworkType());
}
@@ -243,7 +243,7 @@ public class TmdbPeopleTest extends AbstractTests {
String language = LANGUAGE_DEFAULT;
for (TestID test : testIDs) {
TmdbResultsList<ArtworkMedia> result = instance.getPersonTaggedImages(test.getTmdb(), page, language);
ResultList<ArtworkMedia> result = instance.getPersonTaggedImages(test.getTmdb(), page, language);
assertFalse("No images", result.isEmpty());
for (ArtworkMedia am : result.getResults()) {
assertTrue("No ID", StringUtils.isNotBlank(am.getId()));
@@ -266,7 +266,7 @@ public class TmdbPeopleTest extends AbstractTests {
int maxCheck = 5;
TmdbChanges chgs = new TmdbChanges(getApiKey(), getHttpTools());
TmdbResultsList<ChangeListItem> changeList = chgs.getChangeList(MethodBase.PERSON, null, null, null);
ResultList<ChangeListItem> changeList = chgs.getChangeList(MethodBase.PERSON, null, null, null);
LOG.info("Found {} person changes to check", changeList.getResults().size());
int count = 1;
@@ -292,7 +292,7 @@ public class TmdbPeopleTest extends AbstractTests {
public void testGetPersonPopular() throws MovieDbException {
LOG.info("getPersonPopular");
Integer page = null;
TmdbResultsList<PersonFind> result = instance.getPersonPopular(page);
ResultList<PersonFind> result = instance.getPersonPopular(page);
assertFalse("No results", result.isEmpty());
assertTrue("No results", result.getResults().size() > 0);
for (PersonFind p : result.getResults()) {
@@ -30,7 +30,7 @@ import com.omertron.themoviedbapi.model.media.MediaBasic;
import com.omertron.themoviedbapi.model.movie.MovieInfo;
import com.omertron.themoviedbapi.model.person.PersonFind;
import com.omertron.themoviedbapi.model.tv.TVBasic;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertFalse;
@@ -78,7 +78,7 @@ public class TmdbSearchTest extends AbstractTests {
@Test
public void testSearchCompanies() throws MovieDbException {
LOG.info("searchCompanies");
TmdbResultsList<Company> result = instance.searchCompanies(COMPANY_NAME, 0);
ResultList<Company> result = instance.searchCompanies(COMPANY_NAME, 0);
assertNotNull("Null results", result);
assertNotNull("Null company", result.getResults());
assertFalse("Empty company", result.isEmpty());
@@ -94,7 +94,7 @@ public class TmdbSearchTest extends AbstractTests {
LOG.info("searchCollection");
String query = "batman";
int page = 0;
TmdbResultsList<Collection> result = instance.searchCollection(query, page, LANGUAGE_DEFAULT);
ResultList<Collection> result = instance.searchCollection(query, page, LANGUAGE_DEFAULT);
assertNotNull("Null results", result);
assertNotNull("Null collection", result.getResults());
assertFalse("Empty collection", result.isEmpty());
@@ -110,7 +110,7 @@ public class TmdbSearchTest extends AbstractTests {
LOG.info("searchKeyword");
String query = "action";
int page = 0;
TmdbResultsList<Keyword> result = instance.searchKeyword(query, page);
ResultList<Keyword> result = instance.searchKeyword(query, page);
assertNotNull("Null results", result);
assertNotNull("Null keyword", result.getResults());
assertFalse("Empty keyword", result.isEmpty());
@@ -126,7 +126,7 @@ public class TmdbSearchTest extends AbstractTests {
LOG.info("searchList");
String query = "watch";
int page = 0;
TmdbResultsList<UserList> result = instance.searchList(query, page, null);
ResultList<UserList> result = instance.searchList(query, page, null);
assertNotNull("Null results", result);
assertNotNull("Null list", result.getResults());
assertFalse("Empty list", result.isEmpty());
@@ -142,7 +142,7 @@ public class TmdbSearchTest extends AbstractTests {
LOG.info("searchMovie");
// Try a movie with less than 1 page of results
TmdbResultsList<MovieInfo> movieList = instance.searchMovie("Blade Runner", 0, "", null, 0, 0, SearchType.PHRASE);
ResultList<MovieInfo> movieList = instance.searchMovie("Blade Runner", 0, "", null, 0, 0, SearchType.PHRASE);
assertTrue("No movies found, should be at least 1", movieList.getResults().size() > 0);
// Try a russian langugage movie
@@ -166,7 +166,7 @@ public class TmdbSearchTest extends AbstractTests {
Integer page = null;
String language = "";
Boolean includeAdult = null;
TmdbResultsList<MediaBasic> result = instance.searchMulti(query, page, language, includeAdult);
ResultList<MediaBasic> result = instance.searchMulti(query, page, language, includeAdult);
for (MediaBasic item : result.getResults()) {
LOG.info("{}", item);
}
@@ -181,7 +181,7 @@ public class TmdbSearchTest extends AbstractTests {
public void testSearchPeople() throws MovieDbException {
LOG.info("searchPeople");
String personName = "Bruce Willis";
TmdbResultsList<PersonFind> result = instance.searchPeople(personName, null, null, SearchType.PHRASE);
ResultList<PersonFind> result = instance.searchPeople(personName, null, null, SearchType.PHRASE);
assertNotNull("Null results", result);
assertNotNull("Null people", result.getResults());
assertFalse("Empty people", result.isEmpty());
@@ -200,7 +200,7 @@ public class TmdbSearchTest extends AbstractTests {
String language = LANGUAGE_ENGLISH;
Integer firstAirDateYear = null;
SearchType searchType = SearchType.PHRASE;
TmdbResultsList<TVBasic> result = instance.searchTV(query, page, language, firstAirDateYear, searchType);
ResultList<TVBasic> result = instance.searchTV(query, page, language, firstAirDateYear, searchType);
assertNotNull("Null results", result);
assertNotNull("Null TV", result.getResults());
assertFalse("Empty TV", result.isEmpty());
@@ -32,7 +32,7 @@ import com.omertron.themoviedbapi.model.media.MediaState;
import com.omertron.themoviedbapi.model.media.Video;
import com.omertron.themoviedbapi.model.person.ExternalID;
import com.omertron.themoviedbapi.model.tv.TVEpisodeInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@@ -199,7 +199,7 @@ public class TmdbTVEpisodesTest extends AbstractTests {
ArtworkResults results = new ArtworkResults();
for (TestID test : TV_IDS) {
TmdbResultsList<Artwork> result = instance.getEpisodeImages(test.getTmdb(), seasonNumber, episodeNumber);
ResultList<Artwork> result = instance.getEpisodeImages(test.getTmdb(), seasonNumber, episodeNumber);
assertFalse("No artwork", result.isEmpty());
for (Artwork artwork : result.getResults()) {
results.found(artwork.getArtworkType());
@@ -245,7 +245,7 @@ public class TmdbTVEpisodesTest extends AbstractTests {
String language = LANGUAGE_DEFAULT;
for (TestID test : TV_IDS) {
TmdbResultsList<Video> result = instance.getEpisodeVideos(test.getTmdb(), seasonNumber, episodeNumber, language);
ResultList<Video> result = instance.getEpisodeVideos(test.getTmdb(), seasonNumber, episodeNumber, language);
LOG.info("Found {} videos", result.getResults().size());
}
}
@@ -31,7 +31,7 @@ import com.omertron.themoviedbapi.model.media.MediaState;
import com.omertron.themoviedbapi.model.media.Video;
import com.omertron.themoviedbapi.model.person.ExternalID;
import com.omertron.themoviedbapi.model.tv.TVSeasonInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
@@ -192,7 +192,7 @@ public class TmdbTVSeasonsTest extends AbstractTests {
ArtworkResults results = new ArtworkResults();
for (TestID test : TV_IDS) {
TmdbResultsList<Artwork> result = instance.getSeasonImages(test.getTmdb(), seasonNumber, language, includeImageLanguage);
ResultList<Artwork> result = instance.getSeasonImages(test.getTmdb(), seasonNumber, language, includeImageLanguage);
assertFalse("No artwork", result.isEmpty());
for (Artwork artwork : result.getResults()) {
results.found(artwork.getArtworkType());
@@ -217,7 +217,7 @@ public class TmdbTVSeasonsTest extends AbstractTests {
boolean found = false;
for (TestID test : TV_IDS) {
TmdbResultsList<Video> result = instance.getSeasonVideos(test.getTmdb(), seasonNumber, language);
ResultList<Video> result = instance.getSeasonVideos(test.getTmdb(), seasonNumber, language);
found = found || !result.isEmpty();
}
@@ -39,7 +39,7 @@ import com.omertron.themoviedbapi.model.person.ContentRating;
import com.omertron.themoviedbapi.model.person.ExternalID;
import com.omertron.themoviedbapi.model.tv.TVBasic;
import com.omertron.themoviedbapi.model.tv.TVInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.tools.MethodBase;
import com.omertron.themoviedbapi.wrapper.WrapperChanges;
import java.text.SimpleDateFormat;
@@ -127,7 +127,7 @@ public class TmdbTVTest extends AbstractTests {
LOG.info("getTVAlternativeTitles");
for (TestID test : TV_IDS) {
TmdbResultsList<AlternativeTitle> result = instance.getTVAlternativeTitles(test.getTmdb());
ResultList<AlternativeTitle> result = instance.getTVAlternativeTitles(test.getTmdb());
assertFalse("No alt titles", result.isEmpty());
}
}
@@ -146,7 +146,7 @@ public class TmdbTVTest extends AbstractTests {
int maxCheck = 5;
TmdbChanges chgs = new TmdbChanges(getApiKey(), getHttpTools());
TmdbResultsList<ChangeListItem> changeList = chgs.getChangeList(MethodBase.TV, null, null, null);
ResultList<ChangeListItem> changeList = chgs.getChangeList(MethodBase.TV, null, null, null);
LOG.info("Found {} changes to check, will check maximum of {}", changeList.getResults().size(), maxCheck);
int count = 1;
@@ -173,7 +173,7 @@ public class TmdbTVTest extends AbstractTests {
LOG.info("getTVContentRatings");
for (TestID test : TV_IDS) {
TmdbResultsList<ContentRating> result = instance.getTVContentRatings(test.getTmdb());
ResultList<ContentRating> result = instance.getTVContentRatings(test.getTmdb());
assertFalse("No ratings", result.isEmpty());
assertTrue("No language", StringUtils.isNotBlank(result.getResults().get(0).getLanguage()));
assertTrue("No rating", StringUtils.isNotBlank(result.getResults().get(0).getRating()));
@@ -240,7 +240,7 @@ public class TmdbTVTest extends AbstractTests {
ArtworkResults results = new ArtworkResults();
for (TestID test : TV_IDS) {
TmdbResultsList<Artwork> result = instance.getTVImages(test.getTmdb(), language, includeImageLanguage);
ResultList<Artwork> result = instance.getTVImages(test.getTmdb(), language, includeImageLanguage);
assertFalse("No artwork", result.isEmpty());
for (Artwork artwork : result.getResults()) {
results.found(artwork.getArtworkType());
@@ -264,7 +264,7 @@ public class TmdbTVTest extends AbstractTests {
String[] appendToResponse = null;
for (TestID test : TV_IDS) {
TmdbResultsList<Keyword> result = instance.getTVKeywords(test.getTmdb(), appendToResponse);
ResultList<Keyword> result = instance.getTVKeywords(test.getTmdb(), appendToResponse);
assertFalse("No keywords", result.isEmpty());
}
}
@@ -299,7 +299,7 @@ public class TmdbTVTest extends AbstractTests {
String[] appendToResponse = null;
for (TestID test : TV_IDS) {
TmdbResultsList<TVInfo> result = instance.getTVSimilar(test.getTmdb(), page, language, appendToResponse);
ResultList<TVInfo> result = instance.getTVSimilar(test.getTmdb(), page, language, appendToResponse);
assertFalse("No similar TV shows", result.isEmpty());
}
}
@@ -314,7 +314,7 @@ public class TmdbTVTest extends AbstractTests {
LOG.info("getTVTranslations");
for (TestID test : TV_IDS) {
TmdbResultsList<Translation> result = instance.getTVTranslations(test.getTmdb());
ResultList<Translation> result = instance.getTVTranslations(test.getTmdb());
assertFalse("No translations", result.isEmpty());
}
}
@@ -332,7 +332,7 @@ public class TmdbTVTest extends AbstractTests {
boolean found = false;
for (TestID test : TV_IDS) {
TmdbResultsList<Video> result = instance.getTVVideos(test.getTmdb(), language);
ResultList<Video> result = instance.getTVVideos(test.getTmdb(), language);
found = found || !result.isEmpty();
}
assertTrue("No videos", found);
@@ -364,7 +364,7 @@ public class TmdbTVTest extends AbstractTests {
Integer page = null;
String language = LANGUAGE_DEFAULT;
TmdbResultsList<TVBasic> result = instance.getTVOnTheAir(page, language);
ResultList<TVBasic> result = instance.getTVOnTheAir(page, language);
assertFalse("No results", result.isEmpty());
}
@@ -380,7 +380,7 @@ public class TmdbTVTest extends AbstractTests {
String language = LANGUAGE_DEFAULT;
String timezone = "";
TmdbResultsList<TVBasic> result = instance.getTVAiringToday(page, language, timezone);
ResultList<TVBasic> result = instance.getTVAiringToday(page, language, timezone);
assertFalse("No results", result.isEmpty());
}
@@ -395,7 +395,7 @@ public class TmdbTVTest extends AbstractTests {
Integer page = null;
String language = LANGUAGE_DEFAULT;
TmdbResultsList<TVBasic> result = instance.getTVTopRated(page, language);
ResultList<TVBasic> result = instance.getTVTopRated(page, language);
assertFalse("No results", result.isEmpty());
}
@@ -410,7 +410,7 @@ public class TmdbTVTest extends AbstractTests {
Integer page = null;
String language = LANGUAGE_DEFAULT;
TmdbResultsList<TVBasic> result = instance.getTVPopular(page, language);
ResultList<TVBasic> result = instance.getTVPopular(page, language);
assertFalse("No results", result.isEmpty());
}