public class FeedGenerator extends Object implements Serializable
| Constructor and Description |
|---|
FeedGenerator() |
| Modifier and Type | Method and Description |
|---|---|
Feed |
execute()
Queries iTunes using the current state of this
FeedGenerator |
Feed |
execute(Connector connector)
Execute this Feed Generator API request using the provided
Connector implementation. |
Country |
getCountry() |
FeedType |
getFeedType() |
FeedFormat |
getFormat() |
MediaType |
getMediaType() |
int |
getResultsLimit() |
String |
getUrl()
Construct a valid feed URL based on the current state of this
FeedGenerator |
boolean |
isAllowExplicit() |
FeedGenerator |
setAllowExplicit(boolean allowExplicit)
Default value is
true |
FeedGenerator |
setCountry(Country country)
Default value is
Country.UNITED_STATES |
FeedGenerator |
setFeedType(FeedType feedType)
Default value is
FeedType.NEW_MUSIC The given FeedType must be compatible with the current
MediaType. |
FeedGenerator |
setFormat(FeedFormat format)
Default value is
FeedFormat.JSON |
FeedGenerator |
setMediaType(MediaType mediaType)
Default value is
MediaType.APPLE_MUSIC Setting MediaType also changes the FeedType to be compatible
with the given MediaType |
FeedGenerator |
setResultsLimit(int resultsLimit)
Default value is
10 Note that Apple limits results to 200, even when more are requested |
public String getUrl()
FeedGeneratorString, never nullpublic Feed execute()
FeedGeneratorFeedpublic Feed execute(Connector connector)
Connector implementation.connector - Connector implementation, not nullFeed response from iTunesIllegalArgumentException - if argument nullRuntimeException - wrapping any IOException thrown performing the
request or parsing the responsepublic Country getCountry()
public FeedGenerator setCountry(Country country)
Country.UNITED_STATEScountry - a Country, not nullthis instance for method chainingpublic MediaType getMediaType()
public FeedGenerator setMediaType(MediaType mediaType)
MediaType.APPLE_MUSIC MediaType also changes the FeedType to be compatible
with the given MediaTypemediaType - a MediaType, not nullthis instance for method chainingpublic FeedType getFeedType()
public FeedGenerator setFeedType(FeedType feedType)
FeedType.NEW_MUSIC FeedType must be compatible with the current
MediaType. Refer to MediaType.getCompatibleFeedTypes() to
determine which FeedType instances are compatible with the current
MediaType.feedType - a FeedType, not nullthis instance for method chainingMediaType.getCompatibleFeedTypes()public int getResultsLimit()
public FeedGenerator setResultsLimit(int resultsLimit)
10 resultsLimit - a positive integerthis instance for method chainingpublic boolean isAllowExplicit()
public FeedGenerator setAllowExplicit(boolean allowExplicit)
trueallowExplicit - true if explicit results may be includedthis instance for method chainingpublic FeedFormat getFormat()
public FeedGenerator setFormat(FeedFormat format)
FeedFormat.JSONformat - a FeedFormat, not nullthis instance for method chainingCopyright © 2017. All rights reserved.