public class MovieLookup extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
BASE_LOOKUP_URL |
protected static com.neovisionaries.i18n.CountryCode |
DEFAULT_COUNTRY |
protected static int |
DEFAULT_LIMIT |
| Constructor and Description |
|---|
MovieLookup() |
| Modifier and Type | Method and Description |
|---|---|
protected static org.json.JSONObject |
executeQuery(String urlString) |
protected static org.json.JSONObject |
getById(long id)
retrieve a media item by its id
|
static org.json.JSONObject |
getMovieById(long id)
get a movie by it's id
|
static org.json.JSONObject |
topMovies()
get the top 100 movies in the default iTunes store
|
static org.json.JSONObject |
topMovies(com.neovisionaries.i18n.CountryCode countryCode)
get the top 100 movies in the specified iTunes store
|
static org.json.JSONObject |
topMovies(com.neovisionaries.i18n.CountryCode countryCode,
int limit)
get the top (limit) movies in the specified iTunes store
|
static org.json.JSONObject |
topMovies(int limit)
get the top (limit) movies in the default iTunes store
|
protected static final String BASE_LOOKUP_URL
protected static final int DEFAULT_LIMIT
protected static final com.neovisionaries.i18n.CountryCode DEFAULT_COUNTRY
public static org.json.JSONObject getMovieById(long id)
throws NoMatchFoundException
id - The id of the movieNoMatchFoundException - if no movie is found with the passed idpublic static org.json.JSONObject topMovies()
public static org.json.JSONObject topMovies(int limit)
limit - the maximum number of movies to returnpublic static org.json.JSONObject topMovies(com.neovisionaries.i18n.CountryCode countryCode)
countryCode - country code of the itunes store to searchpublic static org.json.JSONObject topMovies(com.neovisionaries.i18n.CountryCode countryCode,
int limit)
countryCode - country code of the itunes store to searchlimit - the maximum number of movies to returnprotected static org.json.JSONObject getById(long id)
throws NoMatchFoundException
id - the itunes id for the itemNoMatchFoundException - if no matching item is foundprotected static org.json.JSONObject executeQuery(String urlString)
Copyright © 2018. All rights reserved.