Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 035b998511 | |||
| b353311169 | |||
| 588c618208 | |||
| 5eb756e03e | |||
| 9c58841c6c | |||
| 64ee879834 | |||
| 56a0cdb341 | |||
| aa522e2e7e | |||
| 67496724ba | |||
| 6b5eb2f5ad |
@@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>com.omertron</groupId>
|
||||
<artifactId>themoviedbapi</artifactId>
|
||||
<version>3.10</version>
|
||||
<version>3.11</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>API-The MovieDB</name>
|
||||
@@ -71,8 +71,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<distribution.format>zip</distribution.format>
|
||||
<version.jackson>2.4.3</version.jackson>
|
||||
<version.slf4j>1.7.7</version.slf4j>
|
||||
<version.jackson>2.4.4</version.jackson>
|
||||
<version.slf4j>1.7.9</version.slf4j>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -85,7 +85,7 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.11</version>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!--JSON-->
|
||||
@@ -120,7 +120,7 @@
|
||||
<dependency>
|
||||
<groupId>org.yamj</groupId>
|
||||
<artifactId>api-common</artifactId>
|
||||
<version>1.1</version>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>buildnumber-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<version>1.3</version>
|
||||
<configuration>
|
||||
<shortRevisionLength>10</shortRevisionLength>
|
||||
<doCheck>false</doCheck>
|
||||
@@ -152,10 +152,8 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<version>3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<failOnError>true</failOnError>
|
||||
<verbose>true</verbose>
|
||||
<!-- excludes><exclude>**/*</exclude></excludes -->
|
||||
@@ -165,7 +163,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<version>2.5</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestEntries>
|
||||
@@ -181,7 +179,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.16</version>
|
||||
<version>2.18</version>
|
||||
<configuration>
|
||||
<!-- To skip tests by default -->
|
||||
<skipTests>${skipTests}</skipTests>
|
||||
@@ -220,7 +218,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<version>2.5.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>distro-assembly</id>
|
||||
@@ -246,7 +244,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.3</version>
|
||||
<version>3.4</version>
|
||||
<configuration>
|
||||
<reportPlugins>
|
||||
<plugin>
|
||||
@@ -278,31 +276,31 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<version>2.6.1</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.1</version>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.5</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<version>2.7</version>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
@@ -22,76 +22,18 @@ package com.omertron.themoviedbapi;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.omertron.themoviedbapi.MovieDbException.MovieDbExceptionType;
|
||||
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.Trailer;
|
||||
import com.omertron.themoviedbapi.model.Translation;
|
||||
import com.omertron.themoviedbapi.model.*;
|
||||
import com.omertron.themoviedbapi.results.TmdbResultsList;
|
||||
import com.omertron.themoviedbapi.results.TmdbResultsMap;
|
||||
import com.omertron.themoviedbapi.tools.ApiUrl;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_ADULT;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_COUNTRY;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_END_DATE;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_ID;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_INCLUDE_ALL_MOVIES;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_LANGUAGE;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_PAGE;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_QUERY;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_SESSION;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_START_DATE;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_TOKEN;
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_YEAR;
|
||||
import com.omertron.themoviedbapi.tools.WebBrowser;
|
||||
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.WrapperTrailers;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperTranslations;
|
||||
import com.omertron.themoviedbapi.wrapper.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.yamj.api.common.http.CommonHttpClient;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URISyntaxException;
|
||||
@@ -100,11 +42,8 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.yamj.api.common.http.CommonHttpClient;
|
||||
|
||||
import static com.omertron.themoviedbapi.tools.ApiUrl.*;
|
||||
|
||||
/**
|
||||
* The MovieDb API
|
||||
@@ -849,7 +788,7 @@ public class TheMovieDbApi {
|
||||
* @throws MovieDbException
|
||||
*/
|
||||
public TmdbResultsList<Trailer> getMovieTrailers(int movieId, String language, String... appendToResponse) throws MovieDbException {
|
||||
ApiUrl apiUrl = new ApiUrl(apiKey, BASE_MOVIE, "/trailers");
|
||||
ApiUrl apiUrl = new ApiUrl(apiKey, BASE_MOVIE, "/videos");
|
||||
apiUrl.addArgument(PARAM_ID, movieId);
|
||||
|
||||
if (StringUtils.isNotBlank(language)) {
|
||||
@@ -863,7 +802,7 @@ public class TheMovieDbApi {
|
||||
|
||||
try {
|
||||
WrapperTrailers wrapper = mapper.readValue(webpage, WrapperTrailers.class);
|
||||
TmdbResultsList<Trailer> results = new TmdbResultsList<Trailer>(wrapper.getAll());
|
||||
TmdbResultsList<Trailer> results = new TmdbResultsList<Trailer>(wrapper.getTrailers());
|
||||
results.copyWrapper(wrapper);
|
||||
return results;
|
||||
} catch (IOException ex) {
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
* TheMovieDB API is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation;private either version 3 of the License;private or
|
||||
* any later version.
|
||||
*
|
||||
* TheMovieDB API is distributed in the hope that it will be useful;private
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with TheMovieDB API. If not;private see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.omertron.themoviedbapi.model;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
@@ -51,6 +51,8 @@ public class KeywordMovie extends AbstractJsonMapping {
|
||||
private boolean adult;
|
||||
@JsonProperty("popularity")
|
||||
private float popularity;
|
||||
@JsonProperty("video")
|
||||
private boolean video;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
@@ -96,6 +98,10 @@ public class KeywordMovie extends AbstractJsonMapping {
|
||||
return popularity;
|
||||
}
|
||||
|
||||
public boolean isVideo() {
|
||||
return video;
|
||||
}
|
||||
|
||||
public void setBackdropPath(String backdropPath) {
|
||||
this.backdropPath = backdropPath;
|
||||
}
|
||||
@@ -135,4 +141,8 @@ public class KeywordMovie extends AbstractJsonMapping {
|
||||
public void setPopularity(float popularity) {
|
||||
this.popularity = popularity;
|
||||
}
|
||||
|
||||
public void setVideo(boolean video) {
|
||||
this.video = video;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
@@ -20,20 +20,12 @@
|
||||
package com.omertron.themoviedbapi.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperAlternativeTitles;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperImages;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperMovie;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperMovieCasts;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperMovieKeywords;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperMovieList;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperReleaseInfo;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperReviews;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperTrailers;
|
||||
import com.omertron.themoviedbapi.wrapper.WrapperTranslations;
|
||||
import java.util.List;
|
||||
import com.omertron.themoviedbapi.wrapper.*;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Movie Bean
|
||||
*
|
||||
@@ -101,7 +93,7 @@ public class MovieDb extends AbstractJsonMapping {
|
||||
private WrapperMovieKeywords keywords;
|
||||
@JsonProperty("releases")
|
||||
private WrapperReleaseInfo releases;
|
||||
@JsonProperty("trailers")
|
||||
@JsonProperty("videos")
|
||||
private WrapperTrailers trailers;
|
||||
@JsonProperty("translations")
|
||||
private WrapperTranslations translations;
|
||||
@@ -111,6 +103,8 @@ public class MovieDb extends AbstractJsonMapping {
|
||||
private WrapperReviews reviews;
|
||||
@JsonProperty("lists")
|
||||
private WrapperMovieList lists;
|
||||
@JsonProperty("video")
|
||||
private Boolean video = null;
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Getter methods">
|
||||
public String getBackdropPath() {
|
||||
@@ -208,6 +202,10 @@ public class MovieDb extends AbstractJsonMapping {
|
||||
public float getUserRating() {
|
||||
return userRating;
|
||||
}
|
||||
|
||||
public Boolean getVideo() {
|
||||
return video;
|
||||
}
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Setter methods">
|
||||
@@ -306,8 +304,12 @@ public class MovieDb extends AbstractJsonMapping {
|
||||
public void setUserRating(float userRating) {
|
||||
this.userRating = userRating;
|
||||
}
|
||||
// </editor-fold>
|
||||
|
||||
public void setVideo(Boolean video) {
|
||||
this.video = video;
|
||||
}
|
||||
// </editor-fold>
|
||||
|
||||
//<editor-fold defaultstate="collapsed" desc="AppendToResponse Getters">
|
||||
public List<AlternativeTitle> getAlternativeTitles() {
|
||||
return alternativeTitles.getTitles();
|
||||
@@ -334,7 +336,7 @@ public class MovieDb extends AbstractJsonMapping {
|
||||
}
|
||||
|
||||
public List<Trailer> getTrailers() {
|
||||
return trailers.getAll();
|
||||
return trailers.getTrailers();
|
||||
}
|
||||
|
||||
public List<Translation> getTranslations() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
@@ -20,6 +20,8 @@
|
||||
package com.omertron.themoviedbapi.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -63,6 +65,16 @@ public class PersonCredit extends AbstractJsonMapping {
|
||||
private int voteCount;
|
||||
@JsonProperty("media_type")
|
||||
private String mediaType;
|
||||
@JsonProperty("video")
|
||||
private boolean video;
|
||||
@JsonProperty("original_name")
|
||||
private String tvOriginalName = DEFAULT_STRING;
|
||||
@JsonProperty("name")
|
||||
private String tvName = DEFAULT_STRING;
|
||||
@JsonProperty("first_air_date")
|
||||
private String firstAirDate = DEFAULT_STRING;
|
||||
@JsonProperty("origin_country")
|
||||
private List<String> originCountry = Collections.emptyList();
|
||||
|
||||
public String getCharacter() {
|
||||
return character;
|
||||
@@ -108,6 +120,26 @@ public class PersonCredit extends AbstractJsonMapping {
|
||||
return creditId;
|
||||
}
|
||||
|
||||
public boolean getVideo() {
|
||||
return video;
|
||||
}
|
||||
|
||||
public String getTvOriginalName() {
|
||||
return tvOriginalName;
|
||||
}
|
||||
|
||||
public String getTvName() {
|
||||
return tvName;
|
||||
}
|
||||
|
||||
public String getFirstAirDate() {
|
||||
return firstAirDate;
|
||||
}
|
||||
|
||||
public List<String> getOriginCountry() {
|
||||
return originCountry;
|
||||
}
|
||||
|
||||
public void setCharacter(String character) {
|
||||
this.character = StringUtils.trimToEmpty(character);
|
||||
}
|
||||
@@ -191,4 +223,24 @@ public class PersonCredit extends AbstractJsonMapping {
|
||||
public void setMediaType(String mediaType) {
|
||||
this.mediaType = mediaType;
|
||||
}
|
||||
|
||||
public void setVideo(boolean video) {
|
||||
this.video = video;
|
||||
}
|
||||
|
||||
public void setTvOriginalName(String tvOriginalName) {
|
||||
this.tvOriginalName = tvOriginalName;
|
||||
}
|
||||
|
||||
public void setTvName(String tvName) {
|
||||
this.tvName = tvName;
|
||||
}
|
||||
|
||||
public void setFirstAirDate(String firstAirDate) {
|
||||
this.firstAirDate = firstAirDate;
|
||||
}
|
||||
|
||||
public void setOriginCountry(List<String> originCountry) {
|
||||
this.originCountry = originCountry;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
package com.omertron.themoviedbapi.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
@@ -37,13 +38,21 @@ public class Trailer extends AbstractJsonMapping {
|
||||
/*
|
||||
* Properties
|
||||
*/
|
||||
private String id;
|
||||
private String name;
|
||||
private String size;
|
||||
private String source;
|
||||
private String key;
|
||||
// The website of the trailer
|
||||
private String website;
|
||||
private String site;
|
||||
private String type;
|
||||
|
||||
@JsonProperty("iso_639_1")
|
||||
private String language;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -52,18 +61,26 @@ public class Trailer extends AbstractJsonMapping {
|
||||
return size;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public String getWebsite() {
|
||||
return website;
|
||||
public String getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@@ -72,26 +89,32 @@ public class Trailer extends AbstractJsonMapping {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public void setWebsite(String website) {
|
||||
this.website = website;
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public void setLanguage(String language) {
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof Trailer) {
|
||||
final Trailer other = (Trailer) obj;
|
||||
return new EqualsBuilder()
|
||||
.append(id, other.id)
|
||||
.append(name, other.name)
|
||||
.append(size, other.size)
|
||||
.append(source, other.source)
|
||||
.append(key, other.key)
|
||||
.append(language, other.language)
|
||||
.isEquals();
|
||||
} else {
|
||||
return false;
|
||||
@@ -101,10 +124,12 @@ public class Trailer extends AbstractJsonMapping {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return new HashCodeBuilder()
|
||||
.append(id)
|
||||
.append(name)
|
||||
.append(size)
|
||||
.append(source)
|
||||
.append(website)
|
||||
.append(key)
|
||||
.append(site)
|
||||
.append(language)
|
||||
.toHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
@@ -21,8 +21,8 @@ package com.omertron.themoviedbapi.wrapper;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.omertron.themoviedbapi.model.Trailer;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -32,51 +32,15 @@ import java.util.List;
|
||||
public class WrapperTrailers extends AbstractWrapperId implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@JsonProperty("quicktime")
|
||||
private List<Trailer> quicktime;
|
||||
@JsonProperty("youtube")
|
||||
private List<Trailer> youtube;
|
||||
|
||||
public List<Trailer> getQuicktime() {
|
||||
return quicktime;
|
||||
}
|
||||
|
||||
public List<Trailer> getYoutube() {
|
||||
return youtube;
|
||||
}
|
||||
|
||||
public void setQuicktime(List<Trailer> quicktime) {
|
||||
this.quicktime = quicktime;
|
||||
}
|
||||
|
||||
public void setYoutube(List<Trailer> youtube) {
|
||||
this.youtube = youtube;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a combined list of the trailers with their source
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<Trailer> getAll() {
|
||||
List<Trailer> trailers = new ArrayList<Trailer>();
|
||||
|
||||
// Add the trailer to the return list along with it's source
|
||||
if (quicktime != null) {
|
||||
for (Trailer trailer : quicktime) {
|
||||
trailer.setWebsite(Trailer.WEBSITE_QUICKTIME);
|
||||
trailers.add(trailer);
|
||||
}
|
||||
}
|
||||
|
||||
// Add the trailer to the return list along with it's source
|
||||
if (youtube != null) {
|
||||
for (Trailer trailer : youtube) {
|
||||
trailer.setWebsite(Trailer.WEBSITE_YOUTUBE);
|
||||
trailers.add(trailer);
|
||||
}
|
||||
}
|
||||
@JsonProperty("results")
|
||||
private List<Trailer> trailers;
|
||||
|
||||
public List<Trailer> getTrailers() {
|
||||
return trailers;
|
||||
}
|
||||
|
||||
public void setTrailers(List<Trailer> trailers) {
|
||||
this.trailers = trailers;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2014 Stuart Boston
|
||||
* Copyright (c) 2004-2015 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
@@ -19,57 +19,21 @@
|
||||
*/
|
||||
package com.omertron.themoviedbapi;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.omertron.themoviedbapi.model.*;
|
||||
import com.omertron.themoviedbapi.results.TmdbResultsList;
|
||||
import com.omertron.themoviedbapi.results.TmdbResultsMap;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.junit.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.omertron.themoviedbapi.model.Account;
|
||||
import com.omertron.themoviedbapi.model.AlternativeTitle;
|
||||
import com.omertron.themoviedbapi.model.Artwork;
|
||||
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.MovieDb;
|
||||
import com.omertron.themoviedbapi.model.MovieDbList;
|
||||
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.Trailer;
|
||||
import com.omertron.themoviedbapi.model.Translation;
|
||||
import com.omertron.themoviedbapi.results.TmdbResultsList;
|
||||
import com.omertron.themoviedbapi.results.TmdbResultsMap;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import java.util.Random;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Test cases for TheMovieDbApi API
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
#Properties file for tests
|
||||
#Fill in the details here
|
||||
Session_ID=INSERT_YOUR_SESSION_ID_HERE
|
||||
Account_ID=ACCOUNT ID FOR SESSION TESTS
|
||||
API_Key=INSERT_YOUR_KEY_HERE
|
||||
Session_ID=63c85deb39337e29b69d78265eb28d639cbd6f72
|
||||
Account_ID=6065849
|
||||
API_Key=5a1a77e2eba8984804586122754f969f
|
||||
Reference in New Issue
Block a user