|
|
|
|
@ -21,7 +21,36 @@ package com.omertron.themoviedbapi;
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
import com.omertron.themoviedbapi.model.*;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Account;
|
|
|
|
|
import com.omertron.themoviedbapi.model.AlternativeTitle;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Artwork;
|
|
|
|
|
import com.omertron.themoviedbapi.model.ArtworkType;
|
|
|
|
|
import com.omertron.themoviedbapi.model.ChangeKeyItem;
|
|
|
|
|
import com.omertron.themoviedbapi.model.ChangedItem;
|
|
|
|
|
import com.omertron.themoviedbapi.model.ChangedMovie;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Collection;
|
|
|
|
|
import com.omertron.themoviedbapi.model.CollectionInfo;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Company;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Discover;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Genre;
|
|
|
|
|
import com.omertron.themoviedbapi.model.JobDepartment;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Keyword;
|
|
|
|
|
import com.omertron.themoviedbapi.model.KeywordMovie;
|
|
|
|
|
import com.omertron.themoviedbapi.model.ListItemStatus;
|
|
|
|
|
import com.omertron.themoviedbapi.model.MovieDb;
|
|
|
|
|
import com.omertron.themoviedbapi.model.MovieDbList;
|
|
|
|
|
import com.omertron.themoviedbapi.model.MovieDbListStatus;
|
|
|
|
|
import com.omertron.themoviedbapi.model.MovieList;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Person;
|
|
|
|
|
import com.omertron.themoviedbapi.model.PersonCredit;
|
|
|
|
|
import com.omertron.themoviedbapi.model.ReleaseInfo;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Reviews;
|
|
|
|
|
import com.omertron.themoviedbapi.model.StatusCode;
|
|
|
|
|
import com.omertron.themoviedbapi.model.TmdbConfiguration;
|
|
|
|
|
import com.omertron.themoviedbapi.model.TokenAuthorisation;
|
|
|
|
|
import com.omertron.themoviedbapi.model.TokenSession;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Translation;
|
|
|
|
|
import com.omertron.themoviedbapi.model.Video;
|
|
|
|
|
import com.omertron.themoviedbapi.results.TmdbResultsList;
|
|
|
|
|
import com.omertron.themoviedbapi.results.TmdbResultsMap;
|
|
|
|
|
import com.omertron.themoviedbapi.tools.ApiUrl;
|
|
|
|
|
@ -30,7 +59,30 @@ import com.omertron.themoviedbapi.tools.MethodBase;
|
|
|
|
|
import com.omertron.themoviedbapi.tools.MethodSub;
|
|
|
|
|
import com.omertron.themoviedbapi.tools.Param;
|
|
|
|
|
import com.omertron.themoviedbapi.tools.TmdbParameters;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.*;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperAlternativeTitles;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperChanges;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperCollection;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperCompany;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperCompanyMovies;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperConfig;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperGenres;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperImages;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperJobList;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperKeywordMovies;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperKeywords;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperMovie;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperMovieCasts;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperMovieChanges;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperMovieDbList;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperMovieKeywords;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperMovieList;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperPerson;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperPersonCredits;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperPersonList;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperReleaseInfo;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperReviews;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperTranslations;
|
|
|
|
|
import com.omertron.themoviedbapi.wrapper.WrapperVideos;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.net.MalformedURLException;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
@ -39,7 +91,7 @@ import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.http.impl.client.CloseableHttpClient;
|
|
|
|
|
import org.apache.http.client.HttpClient;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.yamj.api.common.exception.ApiExceptionType;
|
|
|
|
|
@ -83,7 +135,7 @@ public class TheMovieDbApi {
|
|
|
|
|
* @param httpClient The httpClient to use for web requests.
|
|
|
|
|
* @throws MovieDbException
|
|
|
|
|
*/
|
|
|
|
|
public TheMovieDbApi(String apiKey, CloseableHttpClient httpClient) throws MovieDbException {
|
|
|
|
|
public TheMovieDbApi(String apiKey, HttpClient httpClient) throws MovieDbException {
|
|
|
|
|
this.apiKey = apiKey;
|
|
|
|
|
this.httpTools = new HttpTools(httpClient);
|
|
|
|
|
|
|
|
|
|
|