diff --git a/src/main/java/com/omertron/themoviedbapi/model/account/Account.java b/src/main/java/com/omertron/themoviedbapi/model/account/Account.java index ddd99b261..550e18e05 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/account/Account.java +++ b/src/main/java/com/omertron/themoviedbapi/model/account/Account.java @@ -40,6 +40,8 @@ public class Account extends AbstractJsonMapping implements Serializable, Identi private String language; @JsonProperty("iso_3166_1") private String country; + @JsonProperty("avatar") + private Avatar avatar; @Override public int getId() { @@ -90,4 +92,12 @@ public class Account extends AbstractJsonMapping implements Serializable, Identi public void setCountry(String country) { this.country = country; } + + public Avatar getAvatar() { + return avatar; + } + + public void setAvatar(Avatar avatar) { + this.avatar = avatar; + } } diff --git a/src/main/java/com/omertron/themoviedbapi/model/account/Avatar.java b/src/main/java/com/omertron/themoviedbapi/model/account/Avatar.java new file mode 100644 index 000000000..0be3466e0 --- /dev/null +++ b/src/main/java/com/omertron/themoviedbapi/model/account/Avatar.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2004-2015 Stuart Boston + * + * This file is part of TheMovieDB API. + * + * TheMovieDB API is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation;private either version 3 of the License;private or + * any later version. + * + * TheMovieDB API is distributed in the hope that it will be useful;private + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with TheMovieDB API. If not;private see . + * + */ +package com.omertron.themoviedbapi.model.account; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Avatar { + + @JsonProperty("gravatar") + private Hash hash = null; + + public String getHash() { + return hash == null ? "" : hash.getHash(); + } + + public void setHash(Hash hash) { + this.hash = hash; + } + +} diff --git a/src/main/java/com/omertron/themoviedbapi/model/account/Hash.java b/src/main/java/com/omertron/themoviedbapi/model/account/Hash.java new file mode 100644 index 000000000..91e82f1d6 --- /dev/null +++ b/src/main/java/com/omertron/themoviedbapi/model/account/Hash.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2004-2015 Stuart Boston + * + * This file is part of TheMovieDB API. + * + * TheMovieDB API is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation;private either version 3 of the License;private or + * any later version. + * + * TheMovieDB API is distributed in the hope that it will be useful;private + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with TheMovieDB API. If not;private see . + * + */ +package com.omertron.themoviedbapi.model.account; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Hash { + + @JsonProperty("hash") + private String hash; + + public String getHash() { + return hash; + } + + public void setHash(String hash) { + this.hash = hash; + } + +} diff --git a/src/main/java/com/omertron/themoviedbapi/model/movie/MovieBasic.java b/src/main/java/com/omertron/themoviedbapi/model/movie/MovieBasic.java index 18508ef5f..d538c9fee 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/movie/MovieBasic.java +++ b/src/main/java/com/omertron/themoviedbapi/model/movie/MovieBasic.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.omertron.themoviedbapi.enumeration.MediaType; import com.omertron.themoviedbapi.model.media.MediaBasic; import java.io.Serializable; +import java.util.List; /** * Basic Movie information @@ -33,6 +34,8 @@ public class MovieBasic extends MediaBasic implements Serializable { private static final long serialVersionUID = 100L; + @JsonProperty("_id") + private String mediaId; @JsonProperty("adult") private boolean adult; @JsonProperty("original_title") @@ -45,11 +48,27 @@ public class MovieBasic extends MediaBasic implements Serializable { private Boolean video = null; @JsonProperty("rating") private float userRating = -1f; + @JsonProperty("genre_ids") + private List genreIds; + @JsonProperty("original_language") + private String originalLanguage; + @JsonProperty("overview") + private String overview; + @JsonProperty("revenue") + private long revenue = 0L; public MovieBasic() { super.setMediaType(MediaType.MOVIE); } + public String getMediaId() { + return mediaId; + } + + public void setMediaId(String mediaId) { + this.mediaId = mediaId; + } + public boolean isAdult() { return adult; } @@ -86,7 +105,7 @@ public class MovieBasic extends MediaBasic implements Serializable { return video; } - public void setVideo(boolean video) { + public void setVideo(Boolean video) { this.video = video; } @@ -97,4 +116,36 @@ public class MovieBasic extends MediaBasic implements Serializable { public void setUserRating(float userRating) { this.userRating = userRating; } + + public List getGenreIds() { + return genreIds; + } + + public void setGenreIds(List 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; + } }