Package be.ceau.itunesapi
Class Lookup
- java.lang.Object
-
- be.ceau.itunesapi.Lookup
-
- All Implemented Interfaces:
Serializable
public class Lookup extends Object implements Serializable
Request object for the iTunes Lookup API.- See Also:
- Lookup API, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Lookup()No-arg constructor.
-
Method Summary
-
-
-
Method Detail
-
execute
public Response execute()
Execute this iTunes Lookup API request.- Returns:
- parsed
Responsefrom iTunes - Throws:
RuntimeException- wrapping anyIOExceptionthrown performing the request or parsing the response- See Also:
execute(Connector)
-
execute
public Response execute(Connector connector)
Execute this iTunes Lookup API request using the providedConnectorimplementation.- Parameters:
connector-Connectorinstance, notnull- Returns:
- parsed
Responsefrom iTunes - Throws:
IllegalArgumentException- if argumentnullRuntimeException- wrapping anyIOExceptionthrown performing the request or parsing the response- See Also:
execute()
-
addId
public Lookup addId(String id)
- Parameters:
id- an iTunes item id, can benull- Returns:
thisinstance for method chaining
-
setIds
public Lookup setIds(Collection<String> ids)
- Parameters:
ids- aCollectionof iTunes item ids, can benullor empty- Returns:
thisinstance for method chaining
-
addAmgArtistId
public Lookup addAmgArtistId(String amgArtistId)
- Parameters:
amgArtistId- an All Music artist id, can benull- Returns:
thisinstance for method chaining
-
setAmgArtistIds
public Lookup setAmgArtistIds(Collection<String> amgArtistIds)
- Parameters:
amgArtistIds- aCollectionof All Music artist ids, can benullor empty- Returns:
thisinstance for method chaining
-
addAmgAlbumId
public Lookup addAmgAlbumId(String amgAlbumId)
- Parameters:
amgAlbumId- an All Music album id, can benull- Returns:
thisinstance for method chaining
-
setAmgAlbumId
public Lookup setAmgAlbumId(Collection<String> amgAlbumIds)
- Parameters:
amgAlbumIds- aCollectionof All Music album ids, can benullor empty- Returns:
thisinstance for method chaining
-
addAmgVideoId
public Lookup addAmgVideoId(String amgVideoId)
- Parameters:
amgVideoId- an All Music video id, can benull- Returns:
thisinstance for method chaining
-
setAmgVideoIds
public Lookup setAmgVideoIds(Collection<String> amgVideoIds)
- Parameters:
amgVideoIds- aCollectionof All Music video ids, can benullor empty- Returns:
thisinstance for method chaining
-
addUpc
public Lookup addUpc(String upc)
- Parameters:
upc- a UPC, can benull- Returns:
thisinstance for method chaining
-
setUpcs
public Lookup setUpcs(Collection<String> upcs)
- Parameters:
upcs- aCollectionof UPCs, can benullor empty- Returns:
thisinstance for method chaining
-
addIsbn
public Lookup addIsbn(String isbn)
- Parameters:
isbn- an ISBN, can benull- Returns:
thisinstance for method chaining
-
setIsbns
public Lookup setIsbns(Collection<String> isbns)
- Parameters:
isbns- aCollectionof ISBNs, can benullor empty- Returns:
thisinstance for method chaining
-
setEntity
public Lookup setEntity(Entity entity)
- Parameters:
entity- anEntity, ornull- Returns:
thisinstance for method chaining
-
getLimit
public int getLimit()
- Returns:
- maximum number of results to include in the response, or 0 if not set
-
setLimit
public Lookup setLimit(int limit)
- Parameters:
limit- the maximum number of results to include in the response- Returns:
thisinstance for method chaining
-
setSort
public Lookup setSort(Sort sort)
- Parameters:
sort- aSortinstance, ornull- Returns:
thisinstance for method chaining
-
setCountry
public Lookup setCountry(Country country)
- Parameters:
country- aCountryinstance, ornull- Returns:
thisinstance for method chaining
-
-