Collections

master
Stuart Boston 11 years ago
parent 77b6ae5f60
commit 69d2eba4db

@ -44,8 +44,8 @@ import com.omertron.themoviedbapi.model.AlternativeTitle;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.Certification;
import com.omertron.themoviedbapi.model.change.ChangedMedia;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model.CollectionInfo;
import com.omertron.themoviedbapi.model2.collection.Collection;
import com.omertron.themoviedbapi.model2.collection.CollectionInfo;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model2.Configuration;
import com.omertron.themoviedbapi.model.discover.Discover;

@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.enumeration.ArtworkType;
import com.omertron.themoviedbapi.model.CollectionInfo;
import com.omertron.themoviedbapi.model2.collection.CollectionInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import com.omertron.themoviedbapi.tools.ApiUrl;
import com.omertron.themoviedbapi.tools.HttpTools;

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model2.collection.Collection;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.MovieDb;

@ -25,7 +25,7 @@ Changes (Done)
/person/changes Get a list of people ids that have been edited.
/tv/changes Get a list of TV show ids that have been edited
Collections
Collections (Done)
/collection/{id} Get the basic collection information for a specific collection id.
/collection/{id}/images Get all of the images for a particular collection by collection id.

@ -20,6 +20,7 @@
package com.omertron.themoviedbapi.model;
import com.omertron.themoviedbapi.model2.AbstractJsonMapping;
import com.omertron.themoviedbapi.model2.collection.Collection;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.person.PersonCast;
import com.omertron.themoviedbapi.model.person.PersonCrew;

@ -19,7 +19,6 @@
*/
package com.omertron.themoviedbapi.model2;
import com.omertron.themoviedbapi.model2.AbstractJsonMapping;
import com.fasterxml.jackson.annotation.JsonProperty;
/**

@ -17,11 +17,11 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model2.collection;
import com.omertron.themoviedbapi.model2.AbstractJsonMapping;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.omertron.themoviedbapi.model2.AbstractJsonMapping;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

@ -17,10 +17,10 @@
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.model;
package com.omertron.themoviedbapi.model2.collection;
import com.omertron.themoviedbapi.model2.AbstractJsonMapping;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model2.AbstractJsonMapping;
import java.util.ArrayList;
import java.util.List;

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.wrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model2.collection.Collection;
import java.util.List;
/**

@ -22,8 +22,8 @@ package com.omertron.themoviedbapi;
import com.omertron.themoviedbapi.model.AlternativeTitle;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.change.ChangedMedia;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model.CollectionInfo;
import com.omertron.themoviedbapi.model2.collection.Collection;
import com.omertron.themoviedbapi.model2.collection.CollectionInfo;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model.discover.Discover;
import com.omertron.themoviedbapi.model.Genre;
@ -58,7 +58,7 @@ import org.junit.Test;
*
* @author stuart.boston
*/
public class TheMovieDbApiTest extends AbstractTests{
public class TheMovieDbApiTest extends AbstractTests {
private static TheMovieDbApi tmdb;
// Test data
@ -70,11 +70,6 @@ public class TheMovieDbApiTest extends AbstractTests{
private static final String COMPANY_NAME = "Marvel Studios";
private static final int ID_GENRE_ACTION = 28;
private static final String ID_KEYWORD = "1721";
// Languages
private static final String LANGUAGE_DEFAULT = "";
private static final String LANGUAGE_ENGLISH = "en";
private static final String LANGUAGE_RUSSIAN = "ru";
// session and account id of test users named 'apitests'
public TheMovieDbApiTest() throws MovieDbException {
}
@ -86,6 +81,7 @@ public class TheMovieDbApiTest extends AbstractTests{
/**
* Test of getConfiguration method, of class TheMovieDbApi.
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
@Test
@ -497,8 +493,7 @@ public class TheMovieDbApiTest extends AbstractTests{
/**
* Test of getSessionToken method, of class TheMovieDbApi.
*
* TODO: Cannot be tested without a HTTP authorisation:
* http://help.themoviedb.org/kb/api/user-authentication
* TODO: Cannot be tested without a HTTP authorisation: http://help.themoviedb.org/kb/api/user-authentication
*
* @throws MovieDbException
*/
@ -536,30 +531,6 @@ public class TheMovieDbApiTest extends AbstractTests{
assertTrue("No results found", result.getResults().size() > 0);
}
/**
* Test of getMovieChanges method,of class TheMovieDbApi
*
* TODO: Do not test this until it is fixed
*
* @throws MovieDbException
*/
@Ignore("Do not test this until it is fixed")
public void testGetMovieChanges() throws MovieDbException {
LOG.info("getMovieChanges");
String startDate = "";
String endDate = null;
// Get some popular movies
TmdbResultsList<MovieDb> movieList = tmdb.getPopularMovieList(LANGUAGE_DEFAULT, 0);
for (MovieDb movie : movieList.getResults()) {
TmdbResultsList result = tmdb.getMovieChanges(movie.getId(), startDate, endDate);
LOG.info("{} has {} changes.", movie.getTitle(), result.getResults().size());
assertTrue("No changes found", result.getResults().size() > 0);
break;
}
}
@Test
public void testGetPersonLatest() throws MovieDbException {
LOG.info("getPersonLatest");
@ -615,19 +586,6 @@ public class TheMovieDbApiTest extends AbstractTests{
assertTrue("No keywords found", result.getResults().size() > 0);
}
/**
* Test of getPersonChanges method, of class TheMovieDbApi.
*
* @throws MovieDbException
*/
@Ignore("Not ready yet")
public void testGetPersonChanges() throws MovieDbException {
LOG.info("getPersonChanges");
String startDate = "";
String endDate = "";
tmdb.getPersonChanges(ID_PERSON_BRUCE_WILLIS, startDate, endDate);
}
/**
* Test of getList method, of class TheMovieDbApi.
*

@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Artwork;
import com.omertron.themoviedbapi.model.CollectionInfo;
import com.omertron.themoviedbapi.model2.collection.CollectionInfo;
import com.omertron.themoviedbapi.results.TmdbResultsList;
import org.junit.AfterClass;
import static org.junit.Assert.assertFalse;

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.methods;
import com.omertron.themoviedbapi.AbstractTests;
import com.omertron.themoviedbapi.MovieDbException;
import com.omertron.themoviedbapi.model.Collection;
import com.omertron.themoviedbapi.model2.collection.Collection;
import com.omertron.themoviedbapi.model.Company;
import com.omertron.themoviedbapi.model.keyword.Keyword;
import com.omertron.themoviedbapi.model.MovieDb;

Loading…
Cancel
Save