Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f506be70ea | |||
| 42ff59d4ba | |||
| 302e47b496 | |||
| f0499bba01 | |||
| 95a0613cb0 | |||
| eb396be02e | |||
| 80177ff9c7 | |||
| 66de073677 | |||
| cf667fa69e | |||
| 525657e6f6 | |||
| f0faafe702 | |||
| c7b37121ca | |||
| 2c7095908b | |||
| 012d694d78 | |||
| cbc2121a87 | |||
| d1e1454134 | |||
| 80414b7c2a | |||
| 3bfbc1c0a7 | |||
| 463032bc05 | |||
| c04f330d54 | |||
| e95b76c44a | |||
| d8e56616e8 | |||
| a47c55ee7e | |||
| 4134594de5 | |||
| 64ca72c182 | |||
| d21bf07f1d | |||
| b5b84cc962 | |||
| 2837424c09 | |||
| c8310935aa | |||
| 50171a7da5 | |||
| f512fc0754 | |||
| 06da84c2ac | |||
| c3569f0140 | |||
| 4f9d74c9f7 | |||
| 0aab56a044 | |||
| 87f973955e | |||
| 64e88fa9f3 | |||
| fb0e14cd21 | |||
| 8451a4630b | |||
| e00d9357e2 | |||
| 212143b18d | |||
| c9f85bab6d | |||
| 4ec54425f3 | |||
| 00b538efb1 | |||
| b16d452114 | |||
| a83c75070d | |||
| 178b49c413 | |||
| 55601a0698 | |||
| a874297106 | |||
| eff654fd61 | |||
| 63afef71a4 | |||
| 1b180f9e28 | |||
| cfc215cd74 | |||
| 5fefa68352 |
+5
-5
@@ -10,13 +10,13 @@
|
|||||||
*.dbproj merge=union
|
*.dbproj merge=union
|
||||||
|
|
||||||
# Standard to msysgit
|
# Standard to msysgit
|
||||||
*.doc diff=astextplain
|
*.doc diff=astextplain
|
||||||
*.DOC diff=astextplain
|
*.DOC diff=astextplain
|
||||||
*.docx diff=astextplain
|
*.docx diff=astextplain
|
||||||
*.DOCX diff=astextplain
|
*.DOCX diff=astextplain
|
||||||
*.dot diff=astextplain
|
*.dot diff=astextplain
|
||||||
*.DOT diff=astextplain
|
*.DOT diff=astextplain
|
||||||
*.pdf diff=astextplain
|
*.pdf diff=astextplain
|
||||||
*.PDF diff=astextplain
|
*.PDF diff=astextplain
|
||||||
*.rtf diff=astextplain
|
*.rtf diff=astextplain
|
||||||
*.RTF diff=astextplain
|
*.RTF diff=astextplain
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ import java.lang.annotation.Target;
|
|||||||
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
|
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface JsonProperty {
|
public @interface JsonProperty {
|
||||||
String value() default "";
|
|
||||||
|
String value() default "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ import java.lang.annotation.Target;
|
|||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface JsonRootName {
|
public @interface JsonRootName {
|
||||||
String value() default "";
|
String value() default "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,59 +11,56 @@ import org.json.JSONObject;
|
|||||||
|
|
||||||
public class ObjectMapper {
|
public class ObjectMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This takes a JSON string and creates (and populates) an object of the given class
|
* This takes a JSON string and creates (and populates) an object of the
|
||||||
* with the data from that JSON string. It mimics the method signature of the jackson
|
* given class with the data from that JSON string. It mimics the method
|
||||||
* JSON API, so that we don't have to import the jackson library into this application.
|
* signature of the jackson JSON API, so that we don't have to import the
|
||||||
*
|
* jackson library into this application.
|
||||||
* @param jsonString The JSON string to parse.
|
*
|
||||||
* @param objClass The class of object we want to create.
|
* @param jsonString The JSON string to parse.
|
||||||
* @return The instantiation of that class, populated with data from the JSON object.
|
* @param objClass The class of object we want to create.
|
||||||
* @throws IOException If there was any kind of issue.
|
* @return The instantiation of that class, populated with data from the
|
||||||
*/
|
* JSON object.
|
||||||
public <T> T readValue(String jsonString, Class<T> objClass) throws IOException {
|
* @throws IOException If there was any kind of issue.
|
||||||
try {
|
*/
|
||||||
return readValue(new JSONObject(jsonString), objClass);
|
public <T> T readValue(String jsonString, Class<T> objClass) throws IOException {
|
||||||
}
|
try {
|
||||||
catch (IOException ioe) {
|
return readValue(new JSONObject(jsonString), objClass);
|
||||||
throw ioe;
|
} catch (IOException ioe) {
|
||||||
}
|
throw ioe;
|
||||||
catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <T, R> T readValue(JSONObject json, Class<T> objClass) throws IOException {
|
public <T, R> T readValue(JSONObject json, Class<T> objClass) throws IOException {
|
||||||
try {
|
try {
|
||||||
//TODO Iterate through json object values and call the JsonAnySetter method on the unknown ones.
|
//TODO Iterate through json object values and call the JsonAnySetter method on the unknown ones.
|
||||||
T obj = objClass.newInstance();
|
T obj = objClass.newInstance();
|
||||||
for (Field f : objClass.getFields()) {
|
for (Field f : objClass.getFields()) {
|
||||||
Annotation a = f.getAnnotation(JsonProperty.class);
|
Annotation a = f.getAnnotation(JsonProperty.class);
|
||||||
if (List.class.equals(f.getType()) && (json.optJSONArray(((JsonProperty) a).value()) != null)) { // It's a list.
|
if (List.class.equals(f.getType()) && (json.optJSONArray(((JsonProperty) a).value()) != null)) { // It's a list.
|
||||||
JSONArray jsonArray = json.optJSONArray(((JsonProperty) a).value());
|
JSONArray jsonArray = json.optJSONArray(((JsonProperty) a).value());
|
||||||
ParameterizedType listType = (ParameterizedType) f.getGenericType();
|
ParameterizedType listType = (ParameterizedType) f.getGenericType();
|
||||||
Class<?> subObj = (Class<?>) listType.getActualTypeArguments()[0];
|
Class<?> subObj = (Class<?>) listType.getActualTypeArguments()[0];
|
||||||
List<R> subObjList = ((Class<List<R>>) f.getType()).newInstance();
|
List<R> subObjList = ((Class<List<R>>) f.getType()).newInstance();
|
||||||
for (int i = 0; i < jsonArray.length(); i++) {
|
for (int i = 0; i < jsonArray.length(); i++) {
|
||||||
subObjList.add((R) readValue(jsonArray.getJSONObject(i), subObj));
|
subObjList.add((R) readValue(jsonArray.getJSONObject(i), subObj));
|
||||||
}
|
}
|
||||||
f.set(obj, subObjList);
|
f.set(obj, subObjList);
|
||||||
}
|
} else if (a != null) {
|
||||||
else if (a != null) {
|
f.set(obj, json.opt(((JsonProperty) a).value()));
|
||||||
f.set(obj, json.opt(((JsonProperty) a).value()));
|
}
|
||||||
}
|
}
|
||||||
}
|
return obj;
|
||||||
return obj;
|
} catch (IOException ioe) {
|
||||||
}
|
throw ioe;
|
||||||
catch (IOException ioe) {
|
} catch (Exception e) {
|
||||||
throw ioe;
|
e.printStackTrace();
|
||||||
}
|
throw new IOException(e);
|
||||||
catch (Exception e) {
|
}
|
||||||
e.printStackTrace();
|
}
|
||||||
throw new IOException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,10 @@ Author: Stuart Boston (Omertron AT Gmail DOT com)
|
|||||||
|
|
||||||
This API uses the [TheMovieDB.org API](http://api.themoviedb.org/)
|
This API uses the [TheMovieDB.org API](http://api.themoviedb.org/)
|
||||||
|
|
||||||
Originally written for use by Yet Another Movie Jukebox [(YAMJ)](http://code.google.com/p/moviejukebox/)
|
Originally written for use by YetAnotherMovieJukebox ([YAMJv2](https://github.com/YAMJ/yamj-v2) & [YAMJv3](https://github.com/YAMJ/yamj-v3)), but anyone can feel free to use it for other projects as well.
|
||||||
|
|
||||||
But anyone can use it for other projects as well.
|
[](http://jenkins.omertron.com/job/API-TheMovieDb)
|
||||||
|
|
||||||
[](https://flattr.com/submit/auto?user_id=Omertron&url=https://github.com/Omertron/api-themoviedb&title=TheMovieDB API&language=&tags=github&category=software)
|
|
||||||
|
|
||||||
[](https://bitdeli.com/free "Bitdeli Badge")
|
|
||||||
***
|
***
|
||||||
|
|
||||||
TMDB TV Support
|
TMDB TV Support
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<groupId>com.omertron</groupId>
|
<groupId>com.omertron</groupId>
|
||||||
<artifactId>themoviedbapi</artifactId>
|
<artifactId>themoviedbapi</artifactId>
|
||||||
<version>4.0</version>
|
<version>4.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>API-The MovieDB</name>
|
<name>API-The MovieDB</name>
|
||||||
@@ -71,8 +71,12 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<distribution.format>zip</distribution.format>
|
<distribution.format>zip</distribution.format>
|
||||||
<version.jackson>2.5.1</version.jackson>
|
<version.jackson>2.7.1</version.jackson>
|
||||||
<version.slf4j>1.7.10</version.slf4j>
|
<version.slf4j>1.7.16</version.slf4j>
|
||||||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd-HHmm</maven.build.timestamp.format>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -115,9 +119,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.yamj</groupId>
|
<groupId>org.yamj</groupId>
|
||||||
<artifactId>api-common</artifactId>
|
<artifactId>api-common</artifactId>
|
||||||
<version>1.4</version>
|
<version>2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Apache Utils -->
|
<!-- Apache Utils -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.4</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
@@ -126,207 +135,6 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName>
|
|
||||||
|
|
||||||
<plugins>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>buildnumber-maven-plugin</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
<configuration>
|
|
||||||
<shortRevisionLength>10</shortRevisionLength>
|
|
||||||
<doCheck>false</doCheck>
|
|
||||||
<doUpdate>false</doUpdate>
|
|
||||||
<timestampFormat>{0,date,yyyy-MM-dd HH:mm:ss}</timestampFormat>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>create</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.2</version>
|
|
||||||
<configuration>
|
|
||||||
<failOnError>true</failOnError>
|
|
||||||
<verbose>true</verbose>
|
|
||||||
<!-- excludes><exclude>**/*</exclude></excludes -->
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestEntries>
|
|
||||||
<Specification-Title>${project.name}</Specification-Title>
|
|
||||||
<Specification-Version>${project.version}</Specification-Version>
|
|
||||||
<Implementation-Version>${buildNumber}</Implementation-Version>
|
|
||||||
<Implementation-Title>${timestamp}</Implementation-Title>
|
|
||||||
</manifestEntries>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.18</version>
|
|
||||||
<configuration>
|
|
||||||
<!-- To skip tests by default -->
|
|
||||||
<skipTests>${skipTests}</skipTests>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<version>1.7</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>create-version-txt</id>
|
|
||||||
<phase>generate-resources</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<property name="version_file" value="${project.build.directory}/version.txt" />
|
|
||||||
<property name="header_line" value="The MovieDb API${line.separator}" />
|
|
||||||
<property name="build_date_line" value="Build Date: ${timestamp}${line.separator}" />
|
|
||||||
<property name="version_line" value="Version: ${project.version}${line.separator}" />
|
|
||||||
<property name="buildnumber_line" value="Git-SHA: ${buildNumber}${line.separator}" />
|
|
||||||
<echo>Writing version file: ${version_file}</echo>
|
|
||||||
<echo file="${version_file}" append="false">${header_line}</echo>
|
|
||||||
<echo file="${version_file}" append="true">${build_date_line}</echo>
|
|
||||||
<echo file="${version_file}" append="true">${version_line}</echo>
|
|
||||||
<echo file="${version_file}" append="true">${buildnumber_line}</echo>
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<version>2.5.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>distro-assembly</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>src/main/resources/bin.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>versions-maven-plugin</artifactId>
|
|
||||||
<version>2.1</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<version>3.4</version>
|
|
||||||
<configuration>
|
|
||||||
<reportPlugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.2</version>
|
|
||||||
<reports>
|
|
||||||
<report>index</report>
|
|
||||||
<report>scm</report>
|
|
||||||
<report>issue-tracking</report>
|
|
||||||
<report>help</report>
|
|
||||||
<report>dependency-convergence</report>
|
|
||||||
<report>summary</report>
|
|
||||||
<report>dependency-management</report>
|
|
||||||
<report>dependencies</report>
|
|
||||||
<report>license</report>
|
|
||||||
<report>modules</report>
|
|
||||||
</reports>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.9</version>
|
|
||||||
</plugin>
|
|
||||||
</reportPlugins>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-clean-plugin</artifactId>
|
|
||||||
<version>2.6.1</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<version>2.8.2</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<version>1.5</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
|
||||||
<version>2.5.2</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<version>2.7</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
|
|
||||||
<extensions>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.scm</groupId>
|
|
||||||
<artifactId>maven-scm-provider-gitexe</artifactId>
|
|
||||||
<version>1.8.1</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.scm</groupId>
|
|
||||||
<artifactId>maven-scm-manager-plexus</artifactId>
|
|
||||||
<version>1.8.1</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.kathrynhuxtable.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-gitsite</artifactId>
|
|
||||||
<version>0.3.1</version>
|
|
||||||
</extension>
|
|
||||||
</extensions>
|
|
||||||
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>release-sign-artifacts</id>
|
<id>release-sign-artifacts</id>
|
||||||
@@ -355,4 +163,200 @@
|
|||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}-${project.version}-${timestamp}-${git.commit.id.abbrev}</finalName>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources/</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
<includes>
|
||||||
|
<include>version.txt</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>1.6</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
|
<version>2.5.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.7</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<version>3.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.19.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>pl.project13.maven</groupId>
|
||||||
|
<artifactId>git-commit-id-plugin</artifactId>
|
||||||
|
<version>2.2.0</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>pl.project13.maven</groupId>
|
||||||
|
<artifactId>git-commit-id-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>revision</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
|
||||||
|
<dateFormat>yyyy-MM-dd HH:mm:ss z</dateFormat>
|
||||||
|
<abbrevLength>7</abbrevLength>
|
||||||
|
<injectAllReactorProjects>true</injectAllReactorProjects>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifestEntries>
|
||||||
|
<Specification-Title>${project.name}</Specification-Title>
|
||||||
|
<Specification-Version>${project.version}</Specification-Version>
|
||||||
|
<Implementation-Version>${buildNumber}</Implementation-Version>
|
||||||
|
<Implementation-Title>${timestamp}</Implementation-Title>
|
||||||
|
</manifestEntries>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<!-- To skip tests by default -->
|
||||||
|
<skipTests>${skipTests}</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>distro-assembly</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/resources/bin.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<failOnError>true</failOnError>
|
||||||
|
<verbose>true</verbose>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<reportPlugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<reports>
|
||||||
|
<report>index</report>
|
||||||
|
<report>scm</report>
|
||||||
|
<report>issue-tracking</report>
|
||||||
|
<report>help</report>
|
||||||
|
<report>dependency-convergence</report>
|
||||||
|
<report>summary</report>
|
||||||
|
<report>dependency-management</report>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
<report>modules</report>
|
||||||
|
</reports>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</reportPlugins>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<extensions>
|
||||||
|
<extension>
|
||||||
|
<groupId>org.apache.maven.scm</groupId>
|
||||||
|
<artifactId>maven-scm-provider-gitexe</artifactId>
|
||||||
|
<version>1.9.4</version>
|
||||||
|
</extension>
|
||||||
|
<extension>
|
||||||
|
<groupId>org.apache.maven.scm</groupId>
|
||||||
|
<artifactId>maven-scm-manager-plexus</artifactId>
|
||||||
|
<version>1.9.4</version>
|
||||||
|
</extension>
|
||||||
|
<extension>
|
||||||
|
<groupId>org.kathrynhuxtable.maven.wagon</groupId>
|
||||||
|
<artifactId>wagon-gitsite</artifactId>
|
||||||
|
<version>0.3.1</version>
|
||||||
|
</extension>
|
||||||
|
</extensions>
|
||||||
|
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,7 @@ import com.omertron.themoviedbapi.interfaces.AppendToResponseMethod;
|
|||||||
*/
|
*/
|
||||||
public class AppendToResponseBuilder {
|
public class AppendToResponseBuilder {
|
||||||
|
|
||||||
private StringBuilder response;
|
private final StringBuilder response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the builder with the first method
|
* Construct the builder with the first method
|
||||||
@@ -36,7 +36,7 @@ public class AppendToResponseBuilder {
|
|||||||
* @param method
|
* @param method
|
||||||
*/
|
*/
|
||||||
public AppendToResponseBuilder(AppendToResponseMethod method) {
|
public AppendToResponseBuilder(AppendToResponseMethod method) {
|
||||||
response.append(method.getPropertyString());
|
response = new StringBuilder(method.getPropertyString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -60,6 +60,9 @@ import com.omertron.themoviedbapi.model.collection.CollectionInfo;
|
|||||||
import com.omertron.themoviedbapi.model.company.Company;
|
import com.omertron.themoviedbapi.model.company.Company;
|
||||||
import com.omertron.themoviedbapi.model.config.Configuration;
|
import com.omertron.themoviedbapi.model.config.Configuration;
|
||||||
import com.omertron.themoviedbapi.model.config.JobDepartment;
|
import com.omertron.themoviedbapi.model.config.JobDepartment;
|
||||||
|
import com.omertron.themoviedbapi.model.credits.CreditBasic;
|
||||||
|
import com.omertron.themoviedbapi.model.credits.CreditMovieBasic;
|
||||||
|
import com.omertron.themoviedbapi.model.credits.CreditTVBasic;
|
||||||
import com.omertron.themoviedbapi.model.discover.Discover;
|
import com.omertron.themoviedbapi.model.discover.Discover;
|
||||||
import com.omertron.themoviedbapi.model.keyword.Keyword;
|
import com.omertron.themoviedbapi.model.keyword.Keyword;
|
||||||
import com.omertron.themoviedbapi.model.list.ListItem;
|
import com.omertron.themoviedbapi.model.list.ListItem;
|
||||||
@@ -1162,7 +1165,7 @@ public class TheMovieDbApi {
|
|||||||
* @return
|
* @return
|
||||||
* @throws MovieDbException
|
* @throws MovieDbException
|
||||||
*/
|
*/
|
||||||
public PersonCreditList getPersonMovieCredits(int personId, String language) throws MovieDbException {
|
public PersonCreditList<CreditMovieBasic> getPersonMovieCredits(int personId, String language) throws MovieDbException {
|
||||||
return tmdbPeople.getPersonMovieCredits(personId, language);
|
return tmdbPeople.getPersonMovieCredits(personId, language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1180,7 +1183,7 @@ public class TheMovieDbApi {
|
|||||||
* @return
|
* @return
|
||||||
* @throws MovieDbException
|
* @throws MovieDbException
|
||||||
*/
|
*/
|
||||||
public PersonCreditList getPersonTVCredits(int personId, String language) throws MovieDbException {
|
public PersonCreditList<CreditTVBasic> getPersonTVCredits(int personId, String language) throws MovieDbException {
|
||||||
return tmdbPeople.getPersonTVCredits(personId, language);
|
return tmdbPeople.getPersonTVCredits(personId, language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1198,7 +1201,7 @@ public class TheMovieDbApi {
|
|||||||
* @return
|
* @return
|
||||||
* @throws MovieDbException
|
* @throws MovieDbException
|
||||||
*/
|
*/
|
||||||
public PersonCreditList getPersonCombinedCredits(int personId, String language) throws MovieDbException {
|
public PersonCreditList<CreditBasic> getPersonCombinedCredits(int personId, String language) throws MovieDbException {
|
||||||
return tmdbPeople.getPersonCombinedCredits(personId, language);
|
return tmdbPeople.getPersonCombinedCredits(personId, language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1619,7 +1622,7 @@ public class TheMovieDbApi {
|
|||||||
* @return
|
* @return
|
||||||
* @throws com.omertron.themoviedbapi.MovieDbException
|
* @throws com.omertron.themoviedbapi.MovieDbException
|
||||||
*/
|
*/
|
||||||
public ResultList<TVBasic> getTVOnTheAir(Integer page, String language) throws MovieDbException {
|
public ResultList<TVInfo> getTVOnTheAir(Integer page, String language) throws MovieDbException {
|
||||||
return tmdbTv.getTVOnTheAir(page, language);
|
return tmdbTv.getTVOnTheAir(page, language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1634,7 +1637,7 @@ public class TheMovieDbApi {
|
|||||||
* @return
|
* @return
|
||||||
* @throws com.omertron.themoviedbapi.MovieDbException
|
* @throws com.omertron.themoviedbapi.MovieDbException
|
||||||
*/
|
*/
|
||||||
public ResultList<TVBasic> getTVAiringToday(Integer page, String language, String timezone) throws MovieDbException {
|
public ResultList<TVInfo> getTVAiringToday(Integer page, String language, String timezone) throws MovieDbException {
|
||||||
return tmdbTv.getTVAiringToday(page, language, timezone);
|
return tmdbTv.getTVAiringToday(page, language, timezone);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1651,7 +1654,7 @@ public class TheMovieDbApi {
|
|||||||
* @return
|
* @return
|
||||||
* @throws com.omertron.themoviedbapi.MovieDbException
|
* @throws com.omertron.themoviedbapi.MovieDbException
|
||||||
*/
|
*/
|
||||||
public ResultList<TVBasic> getTVTopRated(Integer page, String language) throws MovieDbException {
|
public ResultList<TVInfo> getTVTopRated(Integer page, String language) throws MovieDbException {
|
||||||
return tmdbTv.getTVTopRated(page, language);
|
return tmdbTv.getTVTopRated(page, language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1663,7 +1666,7 @@ public class TheMovieDbApi {
|
|||||||
* @return
|
* @return
|
||||||
* @throws com.omertron.themoviedbapi.MovieDbException
|
* @throws com.omertron.themoviedbapi.MovieDbException
|
||||||
*/
|
*/
|
||||||
public ResultList<TVBasic> getTVPopular(Integer page, String language) throws MovieDbException {
|
public ResultList<TVInfo> getTVPopular(Integer page, String language) throws MovieDbException {
|
||||||
return tmdbTv.getTVPopular(page, language);
|
return tmdbTv.getTVPopular(page, language);
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -67,7 +67,7 @@ public class AbstractMethod {
|
|||||||
protected final HttpTools httpTools;
|
protected final HttpTools httpTools;
|
||||||
// Jackson JSON configuration
|
// Jackson JSON configuration
|
||||||
protected static final ObjectMapper MAPPER = new ObjectMapper();
|
protected static final ObjectMapper MAPPER = new ObjectMapper();
|
||||||
private static final Map<Class, TypeReference> TYPE_REFS = new HashMap<Class, TypeReference>();
|
private static final Map<Class, TypeReference> TYPE_REFS = new HashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TYPE_REFS.put(MovieBasic.class, new TypeReference<WrapperGenericList<MovieBasic>>() {
|
TYPE_REFS.put(MovieBasic.class, new TypeReference<WrapperGenericList<MovieBasic>>() {
|
||||||
@@ -186,7 +186,7 @@ public class AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperChanges wrapper = MAPPER.readValue(webpage, WrapperChanges.class);
|
WrapperChanges wrapper = MAPPER.readValue(webpage, WrapperChanges.class);
|
||||||
ResultList<ChangeKeyItem> results = new ResultList<ChangeKeyItem>(wrapper.getChangedItems());
|
ResultList<ChangeKeyItem> results = new ResultList<>(wrapper.getChangedItems());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -50,13 +50,16 @@ public class TmdbAuthentication extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is used to generate a valid request token for user based authentication.
|
* This method is used to generate a valid request token for user based
|
||||||
|
* authentication.
|
||||||
*
|
*
|
||||||
* A request token is required in order to request a session id.
|
* A request token is required in order to request a session id.
|
||||||
*
|
*
|
||||||
* You can generate any number of request tokens but they will expire after 60 minutes.
|
* You can generate any number of request tokens but they will expire after
|
||||||
|
* 60 minutes.
|
||||||
*
|
*
|
||||||
* As soon as a valid session id has been created the token will be destroyed.
|
* As soon as a valid session id has been created the token will be
|
||||||
|
* destroyed.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* @throws MovieDbException
|
* @throws MovieDbException
|
||||||
@@ -75,7 +78,8 @@ public class TmdbAuthentication extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is used to generate a session id for user based authentication.
|
* This method is used to generate a session id for user based
|
||||||
|
* authentication.
|
||||||
*
|
*
|
||||||
* A session id is required in order to use any of the write methods.
|
* A session id is required in order to use any of the write methods.
|
||||||
*
|
*
|
||||||
@@ -102,7 +106,8 @@ public class TmdbAuthentication extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is used to generate a session id for user based authentication. User must provide their username and password
|
* This method is used to generate a session id for user based
|
||||||
|
* authentication. User must provide their username and password
|
||||||
*
|
*
|
||||||
* A session id is required in order to use any of the write methods.
|
* A session id is required in order to use any of the write methods.
|
||||||
*
|
*
|
||||||
@@ -136,14 +141,18 @@ public class TmdbAuthentication extends AbstractMethod {
|
|||||||
/**
|
/**
|
||||||
* This method is used to generate a guest session id.
|
* This method is used to generate a guest session id.
|
||||||
*
|
*
|
||||||
* A guest session can be used to rate movies without having a registered TMDb user account.
|
* A guest session can be used to rate movies without having a registered
|
||||||
|
* TMDb user account.
|
||||||
*
|
*
|
||||||
* You should only generate a single guest session per user (or device) as you will be able to attach the ratings to a TMDb user
|
* You should only generate a single guest session per user (or device) as
|
||||||
* account in the future.
|
* you will be able to attach the ratings to a TMDb user account in the
|
||||||
|
* future.
|
||||||
*
|
*
|
||||||
* There are also IP limits in place so you should always make sure it's the end user doing the guest session actions.
|
* There are also IP limits in place so you should always make sure it's the
|
||||||
|
* end user doing the guest session actions.
|
||||||
*
|
*
|
||||||
* If a guest session is not used for the first time within 24 hours, it will be automatically discarded.
|
* If a guest session is not used for the first time within 24 hours, it
|
||||||
|
* will be automatically discarded.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* @throws MovieDbException
|
* @throws MovieDbException
|
||||||
@@ -157,4 +166,5 @@ public class TmdbAuthentication extends AbstractMethod {
|
|||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get Guest Session Token", url, ex);
|
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get Guest Session Token", url, ex);
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -65,7 +65,7 @@ public class TmdbCertifications extends AbstractMethod {
|
|||||||
JsonNode node = MAPPER.readTree(webpage);
|
JsonNode node = MAPPER.readTree(webpage);
|
||||||
Map<String, List<Certification>> results = MAPPER.readValue(node.elements().next().traverse(), new TypeReference<Map<String, List<Certification>>>() {
|
Map<String, List<Certification>> results = MAPPER.readValue(node.elements().next().traverse(), new TypeReference<Map<String, List<Certification>>>() {
|
||||||
});
|
});
|
||||||
return new ResultsMap<String, List<Certification>>(results);
|
return new ResultsMap<>(results);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get movie certifications", url, ex);
|
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get movie certifications", url, ex);
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ public class TmdbCertifications extends AbstractMethod {
|
|||||||
JsonNode node = MAPPER.readTree(webpage);
|
JsonNode node = MAPPER.readTree(webpage);
|
||||||
Map<String, List<Certification>> results = MAPPER.readValue(node.elements().next().traverse(), new TypeReference<Map<String, List<Certification>>>() {
|
Map<String, List<Certification>> results = MAPPER.readValue(node.elements().next().traverse(), new TypeReference<Map<String, List<Certification>>>() {
|
||||||
});
|
});
|
||||||
return new ResultsMap<String, List<Certification>>(results);
|
return new ResultsMap<>(results);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get TV certifications", url, ex);
|
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get TV certifications", url, ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -97,7 +97,7 @@ public class TmdbCollections extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
||||||
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll(ArtworkType.POSTER, ArtworkType.BACKDROP));
|
ResultList<Artwork> results = new ResultList<>(wrapper.getAll(ArtworkType.POSTER, ArtworkType.BACKDROP));
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -95,7 +95,7 @@ public class TmdbConfiguration extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperJobList wrapper = MAPPER.readValue(webpage, WrapperJobList.class);
|
WrapperJobList wrapper = MAPPER.readValue(webpage, WrapperJobList.class);
|
||||||
ResultList<JobDepartment> results = new ResultList<JobDepartment>(wrapper.getJobs());
|
ResultList<JobDepartment> results = new ResultList<>(wrapper.getJobs());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -121,7 +121,7 @@ public class TmdbConfiguration extends AbstractMethod {
|
|||||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get timezone list", url, ex);
|
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get timezone list", url, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultsMap<String, List<String>> timezones = new ResultsMap<String, List<String>>();
|
ResultsMap<String, List<String>> timezones = new ResultsMap<>();
|
||||||
|
|
||||||
for (Map<String, List<String>> tzMap : tzList) {
|
for (Map<String, List<String>> tzMap : tzList) {
|
||||||
for (Map.Entry<String, List<String>> x : tzMap.entrySet()) {
|
for (Map.Entry<String, List<String>> x : tzMap.entrySet()) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,6 @@ import com.omertron.themoviedbapi.tools.Param;
|
|||||||
import com.omertron.themoviedbapi.tools.TmdbParameters;
|
import com.omertron.themoviedbapi.tools.TmdbParameters;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.yamj.api.common.exception.ApiExceptionType;
|
import org.yamj.api.common.exception.ApiExceptionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,7 +77,6 @@ public class TmdbCredits extends AbstractMethod {
|
|||||||
try {
|
try {
|
||||||
return MAPPER.readValue(webpage, CreditInfo.class);
|
return MAPPER.readValue(webpage, CreditInfo.class);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
LoggerFactory.getLogger("test").info("{}",ex);
|
|
||||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get credit info", url, ex);
|
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get credit info", url, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -42,7 +42,6 @@ import com.omertron.themoviedbapi.results.WrapperImages;
|
|||||||
import com.omertron.themoviedbapi.results.WrapperVideos;
|
import com.omertron.themoviedbapi.results.WrapperVideos;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.yamj.api.common.exception.ApiExceptionType;
|
import org.yamj.api.common.exception.ApiExceptionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,7 +64,8 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the primary information about a TV episode by combination of a season and episode number.
|
* Get the primary information about a TV episode by combination of a season
|
||||||
|
* and episode number.
|
||||||
*
|
*
|
||||||
* @param tvID
|
* @param tvID
|
||||||
* @param seasonNumber
|
* @param seasonNumber
|
||||||
@@ -89,7 +89,6 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
try {
|
try {
|
||||||
return MAPPER.readValue(webpage, TVEpisodeInfo.class);
|
return MAPPER.readValue(webpage, TVEpisodeInfo.class);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
LoggerFactory.getLogger("test").warn("{}", ex);
|
|
||||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get TV Episode Info", url, ex);
|
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get TV Episode Info", url, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -108,7 +107,8 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method lets users get the status of whether or not the TV episode has been rated.
|
* This method lets users get the status of whether or not the TV episode
|
||||||
|
* has been rated.
|
||||||
*
|
*
|
||||||
* A valid session id is required.
|
* A valid session id is required.
|
||||||
*
|
*
|
||||||
@@ -161,7 +161,8 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the external ids for a TV episode by comabination of a season and episode number.
|
* Get the external ids for a TV episode by comabination of a season and
|
||||||
|
* episode number.
|
||||||
*
|
*
|
||||||
* @param tvID
|
* @param tvID
|
||||||
* @param seasonNumber
|
* @param seasonNumber
|
||||||
@@ -188,7 +189,8 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the images (episode stills) for a TV episode by combination of a season and episode number.
|
* Get the images (episode stills) for a TV episode by combination of a
|
||||||
|
* season and episode number.
|
||||||
*
|
*
|
||||||
* @param tvID
|
* @param tvID
|
||||||
* @param seasonNumber
|
* @param seasonNumber
|
||||||
@@ -207,7 +209,7 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
||||||
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll());
|
ResultList<Artwork> results = new ResultList<>(wrapper.getAll());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -216,7 +218,8 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method lets users rate a TV episode. A valid session id or guest session id is required.
|
* This method lets users rate a TV episode. A valid session id or guest
|
||||||
|
* session id is required.
|
||||||
*
|
*
|
||||||
* @param tvID
|
* @param tvID
|
||||||
* @param seasonNumber
|
* @param seasonNumber
|
||||||
@@ -253,7 +256,8 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the videos that have been added to a TV episode (teasers, clips, etc...)
|
* Get the videos that have been added to a TV episode (teasers, clips,
|
||||||
|
* etc...)
|
||||||
*
|
*
|
||||||
* @param tvID
|
* @param tvID
|
||||||
* @param seasonNumber
|
* @param seasonNumber
|
||||||
@@ -274,7 +278,7 @@ public class TmdbEpisodes extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
|
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
|
||||||
ResultList<Video> results = new ResultList<Video>(wrapper.getVideos());
|
ResultList<Video> results = new ResultList<>(wrapper.getVideos());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -91,7 +91,7 @@ public class TmdbGenres extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperGenres wrapper = MAPPER.readValue(webpage, WrapperGenres.class);
|
WrapperGenres wrapper = MAPPER.readValue(webpage, WrapperGenres.class);
|
||||||
ResultList<Genre> results = new ResultList<Genre>(wrapper.getGenres());
|
ResultList<Genre> results = new ResultList<>(wrapper.getGenres());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -184,7 +184,7 @@ public class TmdbMovies extends AbstractMethod {
|
|||||||
String webpage = httpTools.getRequest(url);
|
String webpage = httpTools.getRequest(url);
|
||||||
try {
|
try {
|
||||||
WrapperAlternativeTitles wrapper = MAPPER.readValue(webpage, WrapperAlternativeTitles.class);
|
WrapperAlternativeTitles wrapper = MAPPER.readValue(webpage, WrapperAlternativeTitles.class);
|
||||||
ResultList<AlternativeTitle> results = new ResultList<AlternativeTitle>(wrapper.getTitles());
|
ResultList<AlternativeTitle> results = new ResultList<>(wrapper.getTitles());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -231,7 +231,7 @@ public class TmdbMovies extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
||||||
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll());
|
ResultList<Artwork> results = new ResultList<>(wrapper.getAll());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -258,7 +258,7 @@ public class TmdbMovies extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperMovieKeywords wrapper = MAPPER.readValue(webpage, WrapperMovieKeywords.class);
|
WrapperMovieKeywords wrapper = MAPPER.readValue(webpage, WrapperMovieKeywords.class);
|
||||||
ResultList<Keyword> results = new ResultList<Keyword>(wrapper.getKeywords());
|
ResultList<Keyword> results = new ResultList<>(wrapper.getKeywords());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -285,7 +285,7 @@ public class TmdbMovies extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperReleaseInfo wrapper = MAPPER.readValue(webpage, WrapperReleaseInfo.class);
|
WrapperReleaseInfo wrapper = MAPPER.readValue(webpage, WrapperReleaseInfo.class);
|
||||||
ResultList<ReleaseInfo> results = new ResultList<ReleaseInfo>(wrapper.getCountries());
|
ResultList<ReleaseInfo> results = new ResultList<>(wrapper.getCountries());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -314,7 +314,7 @@ public class TmdbMovies extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
|
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
|
||||||
ResultList<Video> results = new ResultList<Video>(wrapper.getVideos());
|
ResultList<Video> results = new ResultList<>(wrapper.getVideos());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -339,7 +339,7 @@ public class TmdbMovies extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperTranslations wrapper = MAPPER.readValue(webpage, WrapperTranslations.class);
|
WrapperTranslations wrapper = MAPPER.readValue(webpage, WrapperTranslations.class);
|
||||||
ResultList<Translation> results = new ResultList<Translation>(wrapper.getTranslations());
|
ResultList<Translation> results = new ResultList<>(wrapper.getTranslations());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -46,7 +46,7 @@ import com.omertron.themoviedbapi.tools.Param;
|
|||||||
import com.omertron.themoviedbapi.tools.TmdbParameters;
|
import com.omertron.themoviedbapi.tools.TmdbParameters;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.yamj.api.common.exception.ApiExceptionType;
|
import org.yamj.api.common.exception.ApiExceptionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,13 +79,19 @@ public class TmdbPeople extends AbstractMethod {
|
|||||||
parameters.add(Param.ID, personId);
|
parameters.add(Param.ID, personId);
|
||||||
parameters.add(Param.APPEND, appendToResponse);
|
parameters.add(Param.APPEND, appendToResponse);
|
||||||
|
|
||||||
|
// Switch combined credits for tv & movie.
|
||||||
|
String atr = (String) parameters.get(Param.APPEND);
|
||||||
|
if (StringUtils.isNotBlank(atr) && atr.contains("combined_credits")) {
|
||||||
|
atr = atr.replace("combined_credits", "tv_credits,movie_credits");
|
||||||
|
parameters.add(Param.APPEND, atr);
|
||||||
|
}
|
||||||
|
|
||||||
URL url = new ApiUrl(apiKey, MethodBase.PERSON).buildUrl(parameters);
|
URL url = new ApiUrl(apiKey, MethodBase.PERSON).buildUrl(parameters);
|
||||||
String webpage = httpTools.getRequest(url);
|
String webpage = httpTools.getRequest(url);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return MAPPER.readValue(webpage, PersonInfo.class);
|
return MAPPER.readValue(webpage, PersonInfo.class);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
LoggerFactory.getLogger("test").info("{}", ex);
|
|
||||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get person info", url, ex);
|
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get person info", url, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,7 +222,7 @@ public class TmdbPeople extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
||||||
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll(ArtworkType.PROFILE));
|
ResultList<Artwork> results = new ResultList<>(wrapper.getAll(ArtworkType.PROFILE));
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -203,13 +203,14 @@ public class TmdbSearch extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperMultiSearch wrapper = MAPPER.readValue(webpage, WrapperMultiSearch.class);
|
WrapperMultiSearch wrapper = MAPPER.readValue(webpage, WrapperMultiSearch.class);
|
||||||
ResultList<MediaBasic> results = new ResultList<MediaBasic>();
|
ResultList<MediaBasic> results = new ResultList<>();
|
||||||
results.getResults().addAll(wrapper.getResults());
|
results.getResults().addAll(wrapper.getResults());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get multi search", url, ex);
|
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get multi search", url, ex);
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a good starting point to start finding people on TMDb.
|
* This is a good starting point to start finding people on TMDb.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -99,8 +99,7 @@ public class TmdbSeasons extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method lets users get the status of whether or not the TV episodes
|
* This method lets users get the status of whether or not the TV episodes of a season have been rated.
|
||||||
* of a season have been rated.
|
|
||||||
*
|
*
|
||||||
* A valid session id is required.
|
* A valid session id is required.
|
||||||
*
|
*
|
||||||
@@ -147,8 +146,7 @@ public class TmdbSeasons extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the external ids that we have stored for a TV season by season
|
* Get the external ids that we have stored for a TV season by season number.
|
||||||
* number.
|
|
||||||
*
|
*
|
||||||
* @param tvID
|
* @param tvID
|
||||||
* @param seasonNumber
|
* @param seasonNumber
|
||||||
@@ -194,7 +192,7 @@ public class TmdbSeasons extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
||||||
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll());
|
ResultList<Artwork> results = new ResultList<>(wrapper.getAll());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -203,8 +201,7 @@ public class TmdbSeasons extends AbstractMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the videos that have been added to a TV season (trailers, teasers,
|
* Get the videos that have been added to a TV season (trailers, teasers, etc...)
|
||||||
* etc...)
|
|
||||||
*
|
*
|
||||||
* @param tvID
|
* @param tvID
|
||||||
* @param seasonNumber
|
* @param seasonNumber
|
||||||
@@ -223,7 +220,7 @@ public class TmdbSeasons extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
|
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
|
||||||
ResultList<Video> results = new ResultList<Video>(wrapper.getVideos());
|
ResultList<Video> results = new ResultList<>(wrapper.getVideos());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -32,7 +32,6 @@ import com.omertron.themoviedbapi.model.media.Translation;
|
|||||||
import com.omertron.themoviedbapi.model.media.Video;
|
import com.omertron.themoviedbapi.model.media.Video;
|
||||||
import com.omertron.themoviedbapi.model.person.ContentRating;
|
import com.omertron.themoviedbapi.model.person.ContentRating;
|
||||||
import com.omertron.themoviedbapi.model.person.ExternalID;
|
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.model.tv.TVInfo;
|
||||||
import com.omertron.themoviedbapi.results.ResultList;
|
import com.omertron.themoviedbapi.results.ResultList;
|
||||||
import com.omertron.themoviedbapi.results.WrapperGenericList;
|
import com.omertron.themoviedbapi.results.WrapperGenericList;
|
||||||
@@ -231,7 +230,7 @@ public class TmdbTV extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
|
||||||
ResultList<Artwork> results = new ResultList<Artwork>(wrapper.getAll());
|
ResultList<Artwork> results = new ResultList<>(wrapper.getAll());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -327,7 +326,7 @@ public class TmdbTV extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperTranslations wrapper = MAPPER.readValue(webpage, WrapperTranslations.class);
|
WrapperTranslations wrapper = MAPPER.readValue(webpage, WrapperTranslations.class);
|
||||||
ResultList<Translation> results = new ResultList<Translation>(wrapper.getTranslations());
|
ResultList<Translation> results = new ResultList<>(wrapper.getTranslations());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -354,7 +353,7 @@ public class TmdbTV extends AbstractMethod {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
|
WrapperVideos wrapper = MAPPER.readValue(webpage, WrapperVideos.class);
|
||||||
ResultList<Video> results = new ResultList<Video>(wrapper.getVideos());
|
ResultList<Video> results = new ResultList<>(wrapper.getVideos());
|
||||||
wrapper.setResultProperties(results);
|
wrapper.setResultProperties(results);
|
||||||
return results;
|
return results;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@@ -390,13 +389,13 @@ public class TmdbTV extends AbstractMethod {
|
|||||||
* @return
|
* @return
|
||||||
* @throws com.omertron.themoviedbapi.MovieDbException
|
* @throws com.omertron.themoviedbapi.MovieDbException
|
||||||
*/
|
*/
|
||||||
public ResultList<TVBasic> getTVOnTheAir(Integer page, String language) throws MovieDbException {
|
public ResultList<TVInfo> getTVOnTheAir(Integer page, String language) throws MovieDbException {
|
||||||
TmdbParameters parameters = new TmdbParameters();
|
TmdbParameters parameters = new TmdbParameters();
|
||||||
parameters.add(Param.PAGE, page);
|
parameters.add(Param.PAGE, page);
|
||||||
parameters.add(Param.LANGUAGE, language);
|
parameters.add(Param.LANGUAGE, language);
|
||||||
|
|
||||||
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.ON_THE_AIR).buildUrl(parameters);
|
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.ON_THE_AIR).buildUrl(parameters);
|
||||||
WrapperGenericList<TVBasic> wrapper = processWrapper(getTypeReference(TVBasic.class), url, "on the air");
|
WrapperGenericList<TVInfo> wrapper = processWrapper(getTypeReference(TVInfo.class), url, "on the air");
|
||||||
return wrapper.getResultsList();
|
return wrapper.getResultsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -411,14 +410,14 @@ public class TmdbTV extends AbstractMethod {
|
|||||||
* @return
|
* @return
|
||||||
* @throws com.omertron.themoviedbapi.MovieDbException
|
* @throws com.omertron.themoviedbapi.MovieDbException
|
||||||
*/
|
*/
|
||||||
public ResultList<TVBasic> getTVAiringToday(Integer page, String language, String timezone) throws MovieDbException {
|
public ResultList<TVInfo> getTVAiringToday(Integer page, String language, String timezone) throws MovieDbException {
|
||||||
TmdbParameters parameters = new TmdbParameters();
|
TmdbParameters parameters = new TmdbParameters();
|
||||||
parameters.add(Param.PAGE, page);
|
parameters.add(Param.PAGE, page);
|
||||||
parameters.add(Param.LANGUAGE, language);
|
parameters.add(Param.LANGUAGE, language);
|
||||||
parameters.add(Param.TIMEZONE, timezone);
|
parameters.add(Param.TIMEZONE, timezone);
|
||||||
|
|
||||||
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.AIRING_TODAY).buildUrl(parameters);
|
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.AIRING_TODAY).buildUrl(parameters);
|
||||||
WrapperGenericList<TVBasic> wrapper = processWrapper(getTypeReference(TVBasic.class), url, "airing today");
|
WrapperGenericList<TVInfo> wrapper = processWrapper(getTypeReference(TVInfo.class), url, "airing today");
|
||||||
return wrapper.getResultsList();
|
return wrapper.getResultsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,13 +434,13 @@ public class TmdbTV extends AbstractMethod {
|
|||||||
* @return
|
* @return
|
||||||
* @throws com.omertron.themoviedbapi.MovieDbException
|
* @throws com.omertron.themoviedbapi.MovieDbException
|
||||||
*/
|
*/
|
||||||
public ResultList<TVBasic> getTVTopRated(Integer page, String language) throws MovieDbException {
|
public ResultList<TVInfo> getTVTopRated(Integer page, String language) throws MovieDbException {
|
||||||
TmdbParameters parameters = new TmdbParameters();
|
TmdbParameters parameters = new TmdbParameters();
|
||||||
parameters.add(Param.PAGE, page);
|
parameters.add(Param.PAGE, page);
|
||||||
parameters.add(Param.LANGUAGE, language);
|
parameters.add(Param.LANGUAGE, language);
|
||||||
|
|
||||||
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.TOP_RATED).buildUrl(parameters);
|
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.TOP_RATED).buildUrl(parameters);
|
||||||
WrapperGenericList<TVBasic> wrapper = processWrapper(getTypeReference(TVBasic.class), url, "top rated TV shows");
|
WrapperGenericList<TVInfo> wrapper = processWrapper(getTypeReference(TVInfo.class), url, "top rated TV shows");
|
||||||
return wrapper.getResultsList();
|
return wrapper.getResultsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -453,13 +452,13 @@ public class TmdbTV extends AbstractMethod {
|
|||||||
* @return
|
* @return
|
||||||
* @throws com.omertron.themoviedbapi.MovieDbException
|
* @throws com.omertron.themoviedbapi.MovieDbException
|
||||||
*/
|
*/
|
||||||
public ResultList<TVBasic> getTVPopular(Integer page, String language) throws MovieDbException {
|
public ResultList<TVInfo> getTVPopular(Integer page, String language) throws MovieDbException {
|
||||||
TmdbParameters parameters = new TmdbParameters();
|
TmdbParameters parameters = new TmdbParameters();
|
||||||
parameters.add(Param.PAGE, page);
|
parameters.add(Param.PAGE, page);
|
||||||
parameters.add(Param.LANGUAGE, language);
|
parameters.add(Param.LANGUAGE, language);
|
||||||
|
|
||||||
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.POPULAR).buildUrl(parameters);
|
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.POPULAR).buildUrl(parameters);
|
||||||
WrapperGenericList<TVBasic> wrapper = processWrapper(getTypeReference(TVBasic.class), url, "popular TV shows");
|
WrapperGenericList<TVInfo> wrapper = processWrapper(getTypeReference(TVInfo.class), url, "popular TV shows");
|
||||||
return wrapper.getResultsList();
|
return wrapper.getResultsList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -31,7 +31,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
*/
|
*/
|
||||||
public class AbstractIdName extends AbstractJsonMapping implements Serializable, Identification {
|
public class AbstractIdName extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
*/
|
*/
|
||||||
public abstract class AbstractJsonMapping implements Serializable {
|
public abstract class AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AbstractJsonMapping.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbstractJsonMapping.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -26,7 +26,7 @@ import java.io.Serializable;
|
|||||||
@JsonRootName("certification")
|
@JsonRootName("certification")
|
||||||
public class Certification extends AbstractJsonMapping implements Serializable {
|
public class Certification extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
// Properties
|
// Properties
|
||||||
@JsonProperty("certification")
|
@JsonProperty("certification")
|
||||||
private String value;
|
private String value;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -33,7 +33,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class FindResults extends AbstractJsonMapping implements Serializable {
|
public class FindResults extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("movie_results")
|
@JsonProperty("movie_results")
|
||||||
private List<MovieBasic> movieResults;
|
private List<MovieBasic> movieResults;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,6 +28,6 @@ import java.io.Serializable;
|
|||||||
@JsonRootName("genre")
|
@JsonRootName("genre")
|
||||||
public class Genre extends AbstractIdName implements Serializable {
|
public class Genre extends AbstractIdName implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
// Nothing to override from the base class.
|
// Nothing to override from the base class.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -31,7 +31,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
@JsonRootName("spoken_language")
|
@JsonRootName("spoken_language")
|
||||||
public class Language extends AbstractJsonMapping implements Serializable {
|
public class Language extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("iso_639_1")
|
@JsonProperty("iso_639_1")
|
||||||
private String isoCode;
|
private String isoCode;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
*/
|
*/
|
||||||
public class StatusCode extends AbstractJsonMapping {
|
public class StatusCode extends AbstractJsonMapping {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("status_code")
|
@JsonProperty("status_code")
|
||||||
private int code;
|
private int code;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -22,11 +22,10 @@ package com.omertron.themoviedbapi.model.account;
|
|||||||
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.omertron.themoviedbapi.interfaces.Identification;
|
import com.omertron.themoviedbapi.interfaces.Identification;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
public class Account extends AbstractJsonMapping implements Serializable, Identification {
|
public class Account extends AbstractJsonMapping implements Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
@@ -40,6 +39,8 @@ public class Account extends AbstractJsonMapping implements Serializable, Identi
|
|||||||
private String language;
|
private String language;
|
||||||
@JsonProperty("iso_3166_1")
|
@JsonProperty("iso_3166_1")
|
||||||
private String country;
|
private String country;
|
||||||
|
@JsonProperty("avatar")
|
||||||
|
private Avatar avatar;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getId() {
|
public int getId() {
|
||||||
@@ -90,4 +91,12 @@ public class Account extends AbstractJsonMapping implements Serializable, Identi
|
|||||||
public void setCountry(String country) {
|
public void setCountry(String country) {
|
||||||
this.country = country;
|
this.country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Avatar getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvatar(Avatar avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2016 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.account;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
||||||
|
|
||||||
|
public class Avatar extends AbstractJsonMapping {
|
||||||
|
|
||||||
|
@JsonProperty("gravatar")
|
||||||
|
private AvatarHash hash = null;
|
||||||
|
|
||||||
|
public String getHash() {
|
||||||
|
return hash == null ? "" : hash.getHash();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHash(AvatarHash hash) {
|
||||||
|
this.hash = hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2016 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.account;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
||||||
|
|
||||||
|
public class AvatarHash extends AbstractJsonMapping {
|
||||||
|
|
||||||
|
@JsonProperty("hash")
|
||||||
|
private String hash;
|
||||||
|
|
||||||
|
public String getHash() {
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHash(String hash) {
|
||||||
|
this.hash = hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -34,7 +34,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
*/
|
*/
|
||||||
public class Artwork extends AbstractJsonMapping implements Serializable {
|
public class Artwork extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -38,7 +38,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
*/
|
*/
|
||||||
public class ArtworkMedia extends Artwork implements Serializable {
|
public class ArtworkMedia extends Artwork implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
private MediaType mediaType;
|
private MediaType mediaType;
|
||||||
@JsonTypeInfo(
|
@JsonTypeInfo(
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -25,7 +25,7 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
public class TokenAuthorisation extends AbstractJsonMapping implements Serializable {
|
public class TokenAuthorisation extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
@JsonProperty("expires_at")
|
@JsonProperty("expires_at")
|
||||||
private String expires;
|
private String expires;
|
||||||
@JsonProperty("request_token")
|
@JsonProperty("request_token")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -25,7 +25,7 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
public class TokenSession extends AbstractJsonMapping implements Serializable {
|
public class TokenSession extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
@JsonProperty("session_id")
|
@JsonProperty("session_id")
|
||||||
private String sessionId;
|
private String sessionId;
|
||||||
@JsonProperty("success")
|
@JsonProperty("success")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -27,11 +27,11 @@ import java.util.List;
|
|||||||
|
|
||||||
public class ChangeKeyItem extends AbstractJsonMapping implements Serializable {
|
public class ChangeKeyItem extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
@JsonProperty("key")
|
@JsonProperty("key")
|
||||||
private String key;
|
private String key;
|
||||||
@JsonProperty("items")
|
@JsonProperty("items")
|
||||||
private List<ChangedItem> changedItems = new ArrayList<ChangedItem>();
|
private List<ChangedItem> changedItems = new ArrayList<>();
|
||||||
|
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return key;
|
return key;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -25,7 +25,7 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
public class ChangeListItem extends AbstractJsonMapping implements Serializable {
|
public class ChangeListItem extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -25,7 +25,7 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
public class ChangedItem extends AbstractJsonMapping implements Serializable {
|
public class ChangedItem extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private String id;
|
private String id;
|
||||||
@JsonProperty("action")
|
@JsonProperty("action")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -24,6 +24,7 @@ import com.fasterxml.jackson.annotation.JsonRootName;
|
|||||||
import com.omertron.themoviedbapi.interfaces.Identification;
|
import com.omertron.themoviedbapi.interfaces.Identification;
|
||||||
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
@@ -34,7 +35,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
@JsonRootName("collection")
|
@JsonRootName("collection")
|
||||||
public class Collection extends AbstractJsonMapping implements Serializable, Identification {
|
public class Collection extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
@@ -48,6 +49,24 @@ public class Collection extends AbstractJsonMapping implements Serializable, Ide
|
|||||||
private String backdropPath;
|
private String backdropPath;
|
||||||
@JsonProperty("release_date")
|
@JsonProperty("release_date")
|
||||||
private String releaseDate;
|
private String releaseDate;
|
||||||
|
@JsonProperty("genre_ids")
|
||||||
|
private List<Integer> genreIds;
|
||||||
|
@JsonProperty("adult")
|
||||||
|
private boolean adult;
|
||||||
|
@JsonProperty("original_language")
|
||||||
|
private String originalLanguage;
|
||||||
|
@JsonProperty("original_title")
|
||||||
|
private String originalTitle;
|
||||||
|
@JsonProperty("overview")
|
||||||
|
private String overview;
|
||||||
|
@JsonProperty("video")
|
||||||
|
private boolean video;
|
||||||
|
@JsonProperty("popularity")
|
||||||
|
private float popularity;
|
||||||
|
@JsonProperty("vote_average")
|
||||||
|
private float voteAverage;
|
||||||
|
@JsonProperty("vote_count")
|
||||||
|
private int voteCount;
|
||||||
|
|
||||||
public String getBackdropPath() {
|
public String getBackdropPath() {
|
||||||
return backdropPath;
|
return backdropPath;
|
||||||
@@ -80,6 +99,18 @@ public class Collection extends AbstractJsonMapping implements Serializable, Ide
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Integer> getGenreIds() {
|
||||||
|
return genreIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAdult() {
|
||||||
|
return adult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginalLanguage() {
|
||||||
|
return originalLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
public void setBackdropPath(String backdropPath) {
|
public void setBackdropPath(String backdropPath) {
|
||||||
this.backdropPath = backdropPath;
|
this.backdropPath = backdropPath;
|
||||||
}
|
}
|
||||||
@@ -105,6 +136,66 @@ public class Collection extends AbstractJsonMapping implements Serializable, Ide
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setGenreIds(List<Integer> genreIds) {
|
||||||
|
this.genreIds = genreIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAdult(boolean adult) {
|
||||||
|
this.adult = adult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalLanguage(String originalLanguage) {
|
||||||
|
this.originalLanguage = originalLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginalTitle() {
|
||||||
|
return originalTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalTitle(String originalTitle) {
|
||||||
|
this.originalTitle = originalTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOverview() {
|
||||||
|
return overview;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOverview(String overview) {
|
||||||
|
this.overview = overview;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isVideo() {
|
||||||
|
return video;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo(boolean video) {
|
||||||
|
this.video = video;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPopularity() {
|
||||||
|
return popularity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPopularity(float popularity) {
|
||||||
|
this.popularity = popularity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getVoteAverage() {
|
||||||
|
return voteAverage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoteAverage(float voteAverage) {
|
||||||
|
this.voteAverage = voteAverage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getVoteCount() {
|
||||||
|
return voteCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoteCount(int voteCount) {
|
||||||
|
this.voteCount = voteCount;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj instanceof Collection) {
|
if (obj instanceof Collection) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -32,7 +32,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class CollectionInfo extends AbstractJsonMapping implements Serializable, Identification {
|
public class CollectionInfo extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
@@ -45,7 +45,7 @@ public class CollectionInfo extends AbstractJsonMapping implements Serializable,
|
|||||||
@JsonProperty("backdrop_path")
|
@JsonProperty("backdrop_path")
|
||||||
private String backdropPath;
|
private String backdropPath;
|
||||||
@JsonProperty("parts")
|
@JsonProperty("parts")
|
||||||
private List<Collection> parts = new ArrayList<Collection>();
|
private List<Collection> parts = new ArrayList<>();
|
||||||
|
|
||||||
public String getBackdropPath() {
|
public String getBackdropPath() {
|
||||||
return backdropPath;
|
return backdropPath;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -32,7 +32,7 @@ import static org.apache.commons.lang3.StringUtils.EMPTY;
|
|||||||
*/
|
*/
|
||||||
public class Company extends AbstractJsonMapping implements Serializable, Identification {
|
public class Company extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
// Properties
|
// Properties
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id = 0;
|
private int id = 0;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -34,7 +34,7 @@ import org.yamj.api.common.exception.ApiExceptionType;
|
|||||||
*/
|
*/
|
||||||
public class Configuration extends AbstractJsonMapping implements Serializable {
|
public class Configuration extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("base_url")
|
@JsonProperty("base_url")
|
||||||
private String baseUrl;
|
private String baseUrl;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -26,7 +26,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class JobDepartment extends AbstractJsonMapping implements Serializable {
|
public class JobDepartment extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
// Properties
|
// Properties
|
||||||
@JsonProperty("department")
|
@JsonProperty("department")
|
||||||
private String department;
|
private String department;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -33,7 +33,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class CreditBasic extends AbstractJsonMapping implements Serializable, Identification {
|
public class CreditBasic extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
private CreditType creditType;
|
private CreditType creditType;
|
||||||
private MediaType mediaType;
|
private MediaType mediaType;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class CreditMovieBasic extends CreditBasic implements Serializable {
|
public class CreditMovieBasic extends CreditBasic implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("adult")
|
@JsonProperty("adult")
|
||||||
private boolean adult;
|
private boolean adult;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class CreditTVBasic extends CreditBasic implements Serializable {
|
public class CreditTVBasic extends CreditBasic implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("episode_count")
|
@JsonProperty("episode_count")
|
||||||
private int episodeCount;
|
private int episodeCount;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -30,7 +30,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class MediaCredit extends AbstractJsonMapping implements Serializable, Identification {
|
public class MediaCredit extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("credit_id")
|
@JsonProperty("credit_id")
|
||||||
private String creditId;
|
private String creditId;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class MediaCreditCast extends MediaCredit implements Serializable {
|
public class MediaCreditCast extends MediaCredit implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("cast_id")
|
@JsonProperty("cast_id")
|
||||||
private int castId = 0;
|
private int castId = 0;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class MediaCreditCrew extends MediaCredit implements Serializable {
|
public class MediaCreditCrew extends MediaCredit implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("department")
|
@JsonProperty("department")
|
||||||
private String department;
|
private String department;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -29,6 +29,6 @@ import java.io.Serializable;
|
|||||||
@JsonRootName("keyword")
|
@JsonRootName("keyword")
|
||||||
public class Keyword extends AbstractIdName implements Serializable {
|
public class Keyword extends AbstractIdName implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
// Nothing to override from the base class.
|
// Nothing to override from the base class.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -33,7 +33,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class ListItem<T> extends AbstractJsonMapping implements Serializable {
|
public class ListItem<T> extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -21,20 +21,29 @@ package com.omertron.themoviedbapi.model.list;
|
|||||||
|
|
||||||
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Holger Brandl
|
* @author Holger Brandl
|
||||||
*/
|
*/
|
||||||
public class ListItemStatus extends AbstractJsonMapping implements Serializable {
|
public class ListItemStatus extends AbstractJsonMapping {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 101L;
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private String id;
|
||||||
@JsonProperty("status_code")
|
@JsonProperty("status_code")
|
||||||
private int statusCode;
|
private int statusCode;
|
||||||
@JsonProperty("item_present")
|
@JsonProperty("item_present")
|
||||||
private boolean itemPresent;
|
private boolean itemPresent;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
public int getStatusCode() {
|
public int getStatusCode() {
|
||||||
return statusCode;
|
return statusCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -30,7 +30,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class UserList extends AbstractJsonMapping implements Serializable {
|
public class UserList extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -29,7 +29,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
*/
|
*/
|
||||||
public class AlternativeTitle implements Serializable {
|
public class AlternativeTitle implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("iso_3166_1")
|
@JsonProperty("iso_3166_1")
|
||||||
private String country;
|
private String country;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -33,7 +33,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class MediaBasic extends AbstractJsonMapping implements Serializable, Identification {
|
public class MediaBasic extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -33,7 +33,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class MediaCreditList extends AbstractJsonMapping implements Serializable, Identification {
|
public class MediaCreditList extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id = 0;
|
private int id = 0;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -31,7 +31,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class MediaState extends AbstractJsonMapping implements Serializable, Identification {
|
public class MediaState extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -29,7 +29,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class RatedValue extends AbstractJsonMapping implements Serializable {
|
public class RatedValue extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("value")
|
@JsonProperty("value")
|
||||||
private float value = -1f;
|
private float value = -1f;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -32,7 +32,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
*/
|
*/
|
||||||
public class Trailer extends AbstractJsonMapping implements Serializable {
|
public class Trailer extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("name")
|
@JsonProperty("name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -32,7 +32,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||||||
*/
|
*/
|
||||||
public class Translation extends AbstractJsonMapping implements Serializable {
|
public class Translation extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("english_name")
|
@JsonProperty("english_name")
|
||||||
private String englishName;
|
private String englishName;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -32,7 +32,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
*/
|
*/
|
||||||
public class Video extends AbstractJsonMapping implements Serializable {
|
public class Video extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.omertron.themoviedbapi.enumeration.MediaType;
|
import com.omertron.themoviedbapi.enumeration.MediaType;
|
||||||
import com.omertron.themoviedbapi.model.media.MediaBasic;
|
import com.omertron.themoviedbapi.model.media.MediaBasic;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic Movie information
|
* Basic Movie information
|
||||||
@@ -31,8 +32,10 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class MovieBasic extends MediaBasic implements Serializable {
|
public class MovieBasic extends MediaBasic implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
|
@JsonProperty("_id")
|
||||||
|
private String mediaId;
|
||||||
@JsonProperty("adult")
|
@JsonProperty("adult")
|
||||||
private boolean adult;
|
private boolean adult;
|
||||||
@JsonProperty("original_title")
|
@JsonProperty("original_title")
|
||||||
@@ -45,11 +48,27 @@ public class MovieBasic extends MediaBasic implements Serializable {
|
|||||||
private Boolean video = null;
|
private Boolean video = null;
|
||||||
@JsonProperty("rating")
|
@JsonProperty("rating")
|
||||||
private float userRating = -1f;
|
private float userRating = -1f;
|
||||||
|
@JsonProperty("genre_ids")
|
||||||
|
private List<Integer> genreIds;
|
||||||
|
@JsonProperty("original_language")
|
||||||
|
private String originalLanguage;
|
||||||
|
@JsonProperty("overview")
|
||||||
|
private String overview;
|
||||||
|
@JsonProperty("revenue")
|
||||||
|
private long revenue = 0L;
|
||||||
|
|
||||||
public MovieBasic() {
|
public MovieBasic() {
|
||||||
super.setMediaType(MediaType.MOVIE);
|
super.setMediaType(MediaType.MOVIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMediaId() {
|
||||||
|
return mediaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMediaId(String mediaId) {
|
||||||
|
this.mediaId = mediaId;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isAdult() {
|
public boolean isAdult() {
|
||||||
return adult;
|
return adult;
|
||||||
}
|
}
|
||||||
@@ -86,7 +105,7 @@ public class MovieBasic extends MediaBasic implements Serializable {
|
|||||||
return video;
|
return video;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVideo(boolean video) {
|
public void setVideo(Boolean video) {
|
||||||
this.video = video;
|
this.video = video;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,4 +116,36 @@ public class MovieBasic extends MediaBasic implements Serializable {
|
|||||||
public void setUserRating(float userRating) {
|
public void setUserRating(float userRating) {
|
||||||
this.userRating = userRating;
|
this.userRating = userRating;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Integer> getGenreIds() {
|
||||||
|
return genreIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGenreIds(List<Integer> genreIds) {
|
||||||
|
this.genreIds = genreIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginalLanguage() {
|
||||||
|
return originalLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalLanguage(String originalLanguage) {
|
||||||
|
this.originalLanguage = originalLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOverview() {
|
||||||
|
return overview;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOverview(String overview) {
|
||||||
|
this.overview = overview;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getRevenue() {
|
||||||
|
return revenue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRevenue(long revenue) {
|
||||||
|
this.revenue = revenue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -53,13 +53,13 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Movie Bean
|
* Movie Info
|
||||||
*
|
*
|
||||||
* @author stuart.boston
|
* @author stuart.boston
|
||||||
*/
|
*/
|
||||||
public class MovieInfo extends MovieBasic implements Serializable, Identification, AppendToResponse<MovieMethod> {
|
public class MovieInfo extends MovieBasic implements Serializable, Identification, AppendToResponse<MovieMethod> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("belongs_to_collection")
|
@JsonProperty("belongs_to_collection")
|
||||||
private Collection belongsToCollection;
|
private Collection belongsToCollection;
|
||||||
@@ -71,18 +71,12 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio
|
|||||||
private String homepage;
|
private String homepage;
|
||||||
@JsonProperty("imdb_id")
|
@JsonProperty("imdb_id")
|
||||||
private String imdbID;
|
private String imdbID;
|
||||||
@JsonProperty("overview")
|
|
||||||
private String overview;
|
|
||||||
@JsonProperty("production_companies")
|
@JsonProperty("production_companies")
|
||||||
private List<ProductionCompany> productionCompanies = Collections.emptyList();
|
private List<ProductionCompany> productionCompanies = Collections.emptyList();
|
||||||
@JsonProperty("production_countries")
|
@JsonProperty("production_countries")
|
||||||
private List<ProductionCountry> productionCountries = Collections.emptyList();
|
private List<ProductionCountry> productionCountries = Collections.emptyList();
|
||||||
@JsonProperty("revenue")
|
|
||||||
private long revenue;
|
|
||||||
@JsonProperty("runtime")
|
@JsonProperty("runtime")
|
||||||
private int runtime;
|
private int runtime;
|
||||||
@JsonProperty("original_language")
|
|
||||||
private String originalLanguage;
|
|
||||||
@JsonProperty("spoken_languages")
|
@JsonProperty("spoken_languages")
|
||||||
private List<Language> spokenLanguages = Collections.emptyList();
|
private List<Language> spokenLanguages = Collections.emptyList();
|
||||||
@JsonProperty("tagline")
|
@JsonProperty("tagline")
|
||||||
@@ -125,10 +119,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio
|
|||||||
return imdbID;
|
return imdbID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOverview() {
|
|
||||||
return overview;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ProductionCompany> getProductionCompanies() {
|
public List<ProductionCompany> getProductionCompanies() {
|
||||||
return productionCompanies;
|
return productionCompanies;
|
||||||
}
|
}
|
||||||
@@ -137,10 +127,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio
|
|||||||
return productionCountries;
|
return productionCountries;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getRevenue() {
|
|
||||||
return revenue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getRuntime() {
|
public int getRuntime() {
|
||||||
return runtime;
|
return runtime;
|
||||||
}
|
}
|
||||||
@@ -156,10 +142,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio
|
|||||||
public String getStatus() {
|
public String getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOriginalLanguage() {
|
|
||||||
return originalLanguage;
|
|
||||||
}
|
|
||||||
// </editor-fold>
|
// </editor-fold>
|
||||||
|
|
||||||
// <editor-fold defaultstate="collapsed" desc="Setter methods">
|
// <editor-fold defaultstate="collapsed" desc="Setter methods">
|
||||||
@@ -183,10 +165,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio
|
|||||||
this.imdbID = imdbID;
|
this.imdbID = imdbID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOverview(String overview) {
|
|
||||||
this.overview = overview;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProductionCompanies(List<ProductionCompany> productionCompanies) {
|
public void setProductionCompanies(List<ProductionCompany> productionCompanies) {
|
||||||
this.productionCompanies = productionCompanies;
|
this.productionCompanies = productionCompanies;
|
||||||
}
|
}
|
||||||
@@ -195,10 +173,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio
|
|||||||
this.productionCountries = productionCountries;
|
this.productionCountries = productionCountries;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRevenue(long revenue) {
|
|
||||||
this.revenue = revenue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRuntime(int runtime) {
|
public void setRuntime(int runtime) {
|
||||||
this.runtime = runtime;
|
this.runtime = runtime;
|
||||||
}
|
}
|
||||||
@@ -214,10 +188,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio
|
|||||||
public void setStatus(String status) {
|
public void setStatus(String status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOriginalLanguage(String originalLanguage) {
|
|
||||||
this.originalLanguage = originalLanguage;
|
|
||||||
}
|
|
||||||
// </editor-fold>
|
// </editor-fold>
|
||||||
|
|
||||||
//<editor-fold defaultstate="collapsed" desc="AppendToResponse Getters">
|
//<editor-fold defaultstate="collapsed" desc="AppendToResponse Getters">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -29,6 +29,6 @@ import java.io.Serializable;
|
|||||||
@JsonRootName("production_company")
|
@JsonRootName("production_company")
|
||||||
public class ProductionCompany extends AbstractIdName implements Serializable {
|
public class ProductionCompany extends AbstractIdName implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
// Nothing to override from the base class.
|
// Nothing to override from the base class.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -32,7 +32,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
@JsonRootName("production_country")
|
@JsonRootName("production_country")
|
||||||
public class ProductionCountry extends AbstractJsonMapping implements Serializable {
|
public class ProductionCountry extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("iso_3166_1")
|
@JsonProperty("iso_3166_1")
|
||||||
private String country;
|
private String country;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -30,7 +30,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
*/
|
*/
|
||||||
public class ReleaseInfo extends AbstractJsonMapping implements Serializable {
|
public class ReleaseInfo extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("iso_3166_1")
|
@JsonProperty("iso_3166_1")
|
||||||
private String country;
|
private String country;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class Network extends AbstractIdName implements Serializable, Identification {
|
public class Network extends AbstractIdName implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
// Nothing to add to base class
|
// Nothing to add to base class
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class ContentRating implements Serializable {
|
public class ContentRating implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("iso_3166_1")
|
@JsonProperty("iso_3166_1")
|
||||||
private String country;
|
private String country;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -29,7 +29,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class CreditInfo extends AbstractJsonMapping implements Serializable {
|
public class CreditInfo extends AbstractJsonMapping implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2015 Stuart Boston
|
* Copyright (c) 2004-2016 Stuart Boston
|
||||||
*
|
*
|
||||||
* This file is part of TheMovieDB API.
|
* This file is part of TheMovieDB API.
|
||||||
*
|
*
|
||||||
@@ -30,7 +30,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class ExternalID extends AbstractJsonMapping implements Serializable, Identification {
|
public class ExternalID extends AbstractJsonMapping implements Serializable, Identification {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4L;
|
private static final long serialVersionUID = 100L;
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user