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
Response
from iTunes - Throws:
RuntimeException
- wrapping anyIOException
thrown 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 providedConnector
implementation.- Parameters:
connector
-Connector
instance, notnull
- Returns:
- parsed
Response
from iTunes - Throws:
IllegalArgumentException
- if argumentnull
RuntimeException
- wrapping anyIOException
thrown 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:
this
instance for method chaining
-
setIds
public Lookup setIds(Collection<String> ids)
- Parameters:
ids
- aCollection
of iTunes item ids, can benull
or empty- Returns:
this
instance for method chaining
-
addAmgArtistId
public Lookup addAmgArtistId(String amgArtistId)
- Parameters:
amgArtistId
- an All Music artist id, can benull
- Returns:
this
instance for method chaining
-
setAmgArtistIds
public Lookup setAmgArtistIds(Collection<String> amgArtistIds)
- Parameters:
amgArtistIds
- aCollection
of All Music artist ids, can benull
or empty- Returns:
this
instance for method chaining
-
addAmgAlbumId
public Lookup addAmgAlbumId(String amgAlbumId)
- Parameters:
amgAlbumId
- an All Music album id, can benull
- Returns:
this
instance for method chaining
-
setAmgAlbumId
public Lookup setAmgAlbumId(Collection<String> amgAlbumIds)
- Parameters:
amgAlbumIds
- aCollection
of All Music album ids, can benull
or empty- Returns:
this
instance for method chaining
-
addAmgVideoId
public Lookup addAmgVideoId(String amgVideoId)
- Parameters:
amgVideoId
- an All Music video id, can benull
- Returns:
this
instance for method chaining
-
setAmgVideoIds
public Lookup setAmgVideoIds(Collection<String> amgVideoIds)
- Parameters:
amgVideoIds
- aCollection
of All Music video ids, can benull
or empty- Returns:
this
instance for method chaining
-
addUpc
public Lookup addUpc(String upc)
- Parameters:
upc
- a UPC, can benull
- Returns:
this
instance for method chaining
-
setUpcs
public Lookup setUpcs(Collection<String> upcs)
- Parameters:
upcs
- aCollection
of UPCs, can benull
or empty- Returns:
this
instance for method chaining
-
addIsbn
public Lookup addIsbn(String isbn)
- Parameters:
isbn
- an ISBN, can benull
- Returns:
this
instance for method chaining
-
setIsbns
public Lookup setIsbns(Collection<String> isbns)
- Parameters:
isbns
- aCollection
of ISBNs, can benull
or empty- Returns:
this
instance for method chaining
-
setEntity
public Lookup setEntity(Entity entity)
- Parameters:
entity
- anEntity
, ornull
- Returns:
this
instance 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:
this
instance for method chaining
-
setSort
public Lookup setSort(Sort sort)
- Parameters:
sort
- aSort
instance, ornull
- Returns:
this
instance for method chaining
-
setCountry
public Lookup setCountry(Country country)
- Parameters:
country
- aCountry
instance, ornull
- Returns:
this
instance for method chaining
-
-