Update model with missing fields
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<Integer> 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<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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user