From c2887f2f8c09c19fe2ae723a7f0abe92c234ce62 Mon Sep 17 00:00:00 2001 From: Stuart Boston Date: Fri, 13 Mar 2015 21:25:40 +0000 Subject: [PATCH] AppendToResponse: TV Methods --- .../themoviedbapi/methods/TmdbTV.java | 16 +- .../themoviedbapi/model/tv/TVInfo.java | 146 +++++++++++++++++- .../com/omertron/themoviedbapi/TestSuite.java | 1 - .../themoviedbapi/methods/TmdbTVTest.java | 44 ++++++ 4 files changed, 195 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/omertron/themoviedbapi/methods/TmdbTV.java b/src/main/java/com/omertron/themoviedbapi/methods/TmdbTV.java index c183c29ee..a8f2c600c 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/TmdbTV.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/TmdbTV.java @@ -96,8 +96,8 @@ public class TmdbTV extends AbstractMethod { } /** - * This method lets users get the status of whether or not the TV show has - * been rated or added to their favourite or watch lists. + * This method lets users get the status of whether or not the TV show has been rated or added to their favourite or watch + * lists. * * A valid session id is required. * @@ -317,8 +317,7 @@ public class TmdbTV extends AbstractMethod { } /** - * Get the list of translations that exist for a TV series. These - * translations cascade down to the episode level. + * Get the list of translations that exist for a TV series. These translations cascade down to the episode level. * * @param tvID * @return @@ -342,8 +341,7 @@ public class TmdbTV extends AbstractMethod { } /** - * Get the videos that have been added to a TV series (trailers, opening - * credits, etc...) + * Get the videos that have been added to a TV series (trailers, opening credits, etc...) * * @param tvID * @param language @@ -388,8 +386,7 @@ public class TmdbTV extends AbstractMethod { /** * Get the list of TV shows that are currently on the air. * - * This query looks for any TV show that has an episode with an air date in - * the next 7 days. + * This query looks for any TV show that has an episode with an air date in the next 7 days. * * @param page * @param language @@ -431,8 +428,7 @@ public class TmdbTV extends AbstractMethod { /** * Get the list of top rated TV shows. * - * By default, this list will only include TV shows that have 2 or more - * votes. + * By default, this list will only include TV shows that have 2 or more votes. * * This list refreshes every day. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/tv/TVInfo.java b/src/main/java/com/omertron/themoviedbapi/model/tv/TVInfo.java index f4caa0c79..b7c9354a6 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/tv/TVInfo.java +++ b/src/main/java/com/omertron/themoviedbapi/model/tv/TVInfo.java @@ -20,12 +20,30 @@ package com.omertron.themoviedbapi.model.tv; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.omertron.themoviedbapi.enumeration.TVMethod; import com.omertron.themoviedbapi.model.Genre; +import com.omertron.themoviedbapi.model.artwork.Artwork; +import com.omertron.themoviedbapi.model.change.ChangeKeyItem; +import com.omertron.themoviedbapi.model.keyword.Keyword; +import com.omertron.themoviedbapi.model.media.AlternativeTitle; +import com.omertron.themoviedbapi.model.media.MediaCreditList; +import com.omertron.themoviedbapi.model.media.Translation; +import com.omertron.themoviedbapi.model.media.Video; import com.omertron.themoviedbapi.model.movie.ProductionCompany; import com.omertron.themoviedbapi.model.network.Network; +import com.omertron.themoviedbapi.model.person.ContentRating; +import com.omertron.themoviedbapi.model.person.ExternalID; import com.omertron.themoviedbapi.model.person.PersonBasic; +import com.omertron.themoviedbapi.results.WrapperChanges; +import com.omertron.themoviedbapi.results.WrapperGenericList; +import com.omertron.themoviedbapi.results.WrapperImages; +import com.omertron.themoviedbapi.results.WrapperTranslations; import java.io.Serializable; +import java.util.Collections; +import java.util.EnumSet; import java.util.List; +import java.util.Set; /** * @@ -67,7 +85,21 @@ public class TVInfo extends TVBasic implements Serializable { private String status; @JsonProperty("type") private String type; - + // AppendToResponse + private final Set methods = EnumSet.noneOf(TVMethod.class); + // AppendToResponse Properties + private List alternativeTitles = Collections.emptyList(); + private List changes = Collections.emptyList(); + private List contentRatings = Collections.emptyList(); + private MediaCreditList credits = new MediaCreditList(); + private ExternalID externalIDs = new ExternalID(); + private List images = Collections.emptyList(); + private List keywords = Collections.emptyList(); + private List translations = Collections.emptyList(); + private List similarTV = Collections.emptyList(); + private List