Class GetShowsEpisodesRequest.Builder
- java.lang.Object
-
- se.michaelthelin.spotify.requests.AbstractRequest.Builder<T,BT>
-
- se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<Paging<T>,BT>
-
- se.michaelthelin.spotify.requests.data.AbstractDataPagingRequest.Builder<EpisodeSimplified,GetShowsEpisodesRequest.Builder>
-
- se.michaelthelin.spotify.requests.data.shows.GetShowsEpisodesRequest.Builder
-
- All Implemented Interfaces:
IPagingRequestBuilder<EpisodeSimplified,GetShowsEpisodesRequest.Builder>,IRequest.Builder<Paging<EpisodeSimplified>,GetShowsEpisodesRequest.Builder>
- Enclosing class:
- GetShowsEpisodesRequest
public static final class GetShowsEpisodesRequest.Builder extends AbstractDataPagingRequest.Builder<EpisodeSimplified,GetShowsEpisodesRequest.Builder>
Builder class for building aGetShowsEpisodesRequest.
-
-
Constructor Summary
Constructors Constructor Description Builder(String accessToken)Create a newGetShowsEpisodesRequest.Builderinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetShowsEpisodesRequestbuild()The request build method.GetShowsEpisodesRequest.Builderid(String id)The show ID setter.GetShowsEpisodesRequest.Builderlimit(Integer limit)The limit setter.GetShowsEpisodesRequest.Buildermarket(com.neovisionaries.i18n.CountryCode market)The market country code setter.GetShowsEpisodesRequest.Builderoffset(Integer offset)The offset setter.protected GetShowsEpisodesRequest.Builderself()Return this instance to simulate a self-type.-
Methods inherited from class se.michaelthelin.spotify.requests.AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setScheme
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface se.michaelthelin.spotify.requests.IRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setScheme
-
-
-
-
Constructor Detail
-
Builder
public Builder(String accessToken)
Create a newGetShowsEpisodesRequest.Builderinstance.Reading the user’s resume points on episode objects requires the
user-read-playback-positionscope.- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.- See Also:
- Spotify: Using Scopes
-
-
Method Detail
-
id
public GetShowsEpisodesRequest.Builder id(String id)
The show ID setter.- Parameters:
id- The Spotify ID for the show.- Returns:
- A
GetShowsEpisodesRequest.Builder. - See Also:
- Spotify: URIs & IDs
-
limit
public GetShowsEpisodesRequest.Builder limit(Integer limit)
The limit setter.- Parameters:
limit- Optional. The maximum number of episodes to return. Default: 20. Minimum: 1. Maximum: 50.- Returns:
- A
GetShowsEpisodesRequest.Builder.
-
offset
public GetShowsEpisodesRequest.Builder offset(Integer offset)
The offset setter.- Parameters:
offset- Optional. The index of the first episode to return. Default: 0 (i.e., the first object). Use withlimit(Integer)to get the next set of objects.- Returns:
- A
GetShowsEpisodesRequest.Builder.
-
market
public GetShowsEpisodesRequest.Builder market(com.neovisionaries.i18n.CountryCode market)
The market country code setter.If a country code is specified, only shows and episodes that are available in that market will be returned. If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter. Note: If neither market or user country are provided, the content is considered unavailable for the client.
Users can view the country that is associated with their account in the account settings.
- Parameters:
market- Optional. An ISO 3166-1 alpha-2 country code.- Returns:
- A
GetShowsEpisodesRequest.Builder. - See Also:
- Wikipedia: ISO 3166-1 alpha-2 country codes
-
build
public GetShowsEpisodesRequest build()
The request build method.- Returns:
- A custom
GetShowsEpisodesRequest.
-
self
protected GetShowsEpisodesRequest.Builder self()
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<Paging<EpisodeSimplified>,GetShowsEpisodesRequest.Builder>- Returns:
- This instance.
-
-