From 4203dc55a5fa909d8c4703f3f456ac5761adbff6 Mon Sep 17 00:00:00 2001 From: Stuart Boston Date: Mon, 2 Apr 2018 21:41:55 +0100 Subject: [PATCH] Update Alternative Titles --- .../model/media/AlternativeTitle.java | 12 ++++++++++ .../model/movie/ProductionCompany.java | 23 ++++++++++++++++++- .../themoviedbapi/methods/TmdbMoviesTest.java | 1 - 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/omertron/themoviedbapi/model/media/AlternativeTitle.java b/src/main/java/com/omertron/themoviedbapi/model/media/AlternativeTitle.java index 7cd8a2ee8..5aa6983d0 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/media/AlternativeTitle.java +++ b/src/main/java/com/omertron/themoviedbapi/model/media/AlternativeTitle.java @@ -35,6 +35,8 @@ public class AlternativeTitle implements Serializable { private String country; @JsonProperty("title") private String title; + @JsonProperty("type") + private String type; public String getCountry() { return country; @@ -52,6 +54,14 @@ public class AlternativeTitle implements Serializable { this.title = title; } + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + @Override public boolean equals(Object obj) { if (obj instanceof AlternativeTitle) { @@ -59,6 +69,7 @@ public class AlternativeTitle implements Serializable { return new EqualsBuilder() .append(country, other.country) .append(title, other.title) + .append(type, other.type) .isEquals(); } else { return false; @@ -70,6 +81,7 @@ public class AlternativeTitle implements Serializable { return new HashCodeBuilder() .append(country) .append(title) + .append(type) .toHashCode(); } } diff --git a/src/main/java/com/omertron/themoviedbapi/model/movie/ProductionCompany.java b/src/main/java/com/omertron/themoviedbapi/model/movie/ProductionCompany.java index 939924ceb..0a07ef0c0 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/movie/ProductionCompany.java +++ b/src/main/java/com/omertron/themoviedbapi/model/movie/ProductionCompany.java @@ -19,6 +19,7 @@ */ package com.omertron.themoviedbapi.model.movie; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; import com.omertron.themoviedbapi.model.AbstractIdName; import java.io.Serializable; @@ -30,5 +31,25 @@ import java.io.Serializable; public class ProductionCompany extends AbstractIdName implements Serializable { private static final long serialVersionUID = 100L; - // Nothing to override from the base class. + @JsonProperty("logo_path") + private String logoPath; + @JsonProperty("origin_country") + private String originCountry; + + public String getLogoPath() { + return logoPath; + } + + public void setLogoPath(String logoPath) { + this.logoPath = logoPath; + } + + public String getOriginCountry() { + return originCountry; + } + + public void setOriginCountry(String originCountry) { + this.originCountry = originCountry; + } + } diff --git a/src/test/java/com/omertron/themoviedbapi/methods/TmdbMoviesTest.java b/src/test/java/com/omertron/themoviedbapi/methods/TmdbMoviesTest.java index f7b0ac01e..86e84eb76 100644 --- a/src/test/java/com/omertron/themoviedbapi/methods/TmdbMoviesTest.java +++ b/src/test/java/com/omertron/themoviedbapi/methods/TmdbMoviesTest.java @@ -343,7 +343,6 @@ public class TmdbMoviesTest extends AbstractTests { } } - /** * Test of getMovieReviews method, of class TmdbMovies. *