Class GetUsersCurrentlyPlayingTrackRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<CurrentlyPlaying,GetUsersCurrentlyPlayingTrackRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<CurrentlyPlaying,GetUsersCurrentlyPlayingTrackRequest.Builder>
se.michaelthelin.spotify.requests.data.player.GetUsersCurrentlyPlayingTrackRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<CurrentlyPlaying,
GetUsersCurrentlyPlayingTrackRequest.Builder>
- Enclosing class:
GetUsersCurrentlyPlayingTrackRequest
public static final class GetUsersCurrentlyPlayingTrackRequest.Builder
extends AbstractDataRequest.Builder<CurrentlyPlaying,GetUsersCurrentlyPlayingTrackRequest.Builder>
Builder class for building a
GetUsersCurrentlyPlayingTrackRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadditionalTypes
(String additionalTypes) The additional types setter.build()
The request build method.market
(com.neovisionaries.i18n.CountryCode market) The market country code setter.self()
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
-
Constructor Details
-
Builder
Create a newGetUsersCurrentlyPlayingTrackRequest.Builder
.Your access token must have the
user-read-currently-playing
scope and/or theuser-read-playback-state
authorized in order to read information.- Parameters:
accessToken
- Required. A valid access token from the Spotify Accounts service.- See Also:
-
-
Method Details
-
market
public GetUsersCurrentlyPlayingTrackRequest.Builder market(com.neovisionaries.i18n.CountryCode market) The market country code setter.- Parameters:
market
- Optional. An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.- Returns:
- A
GetUsersCurrentlyPlayingTrackRequest.Builder
. - See Also:
-
additionalTypes
The additional types setter.- Parameters:
additionalTypes
- Optional. A comma-separated list of item types that your client supports besides the default track type. Valid types are:track
andepisode
. An unsupported type in the response is expected to be represented asnull
value in theitem
field.- Returns:
- A
GetUsersCurrentlyPlayingTrackRequest.Builder
.
-
build
The request build method.- Returns:
- A custom
GetUsersCurrentlyPlayingTrackRequest
.
-
self
Description copied from class:AbstractRequest.Builder
Return this instance to simulate a self-type.- Specified by:
self
in classAbstractRequest.Builder<CurrentlyPlaying,
GetUsersCurrentlyPlayingTrackRequest.Builder> - Returns:
- This instance.
-