Class SeekToPositionInCurrentlyPlayingTrackRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<String,SeekToPositionInCurrentlyPlayingTrackRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<String,SeekToPositionInCurrentlyPlayingTrackRequest.Builder>
se.michaelthelin.spotify.requests.data.player.SeekToPositionInCurrentlyPlayingTrackRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<String,
SeekToPositionInCurrentlyPlayingTrackRequest.Builder>
- Enclosing class:
SeekToPositionInCurrentlyPlayingTrackRequest
public static final class SeekToPositionInCurrentlyPlayingTrackRequest.Builder
extends AbstractDataRequest.Builder<String,SeekToPositionInCurrentlyPlayingTrackRequest.Builder>
Builder class for building a
SeekToPositionInCurrentlyPlayingTrackRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The request build method.The device ID setter.position_ms
(Integer position_ms) The position 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 newSeekToPositionInCurrentlyPlayingTrackRequest.Builder
.Your access token must have the
user-modify-playback-state
scope authorized in order to control playback.- Parameters:
accessToken
- Required. A valid access token from the Spotify Accounts service.- See Also:
-
-
Method Details
-
position_ms
The position setter.- Parameters:
position_ms
- Required. The position in milliseconds to seek to. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song.- Returns:
- A
SeekToPositionInCurrentlyPlayingTrackRequest.Builder
.
-
device_id
The device ID setter.- Parameters:
device_id
- Optional. The ID of the device this command is targeting. If not supplied, the user's currently active device is the target.- Returns:
- A
SeekToPositionInCurrentlyPlayingTrackRequest.Builder
. - See Also:
-
build
The request build method.- Returns:
- A custom
SeekToPositionInCurrentlyPlayingTrackRequest
.
-
self
Description copied from class:AbstractRequest.Builder
Return this instance to simulate a self-type.- Specified by:
self
in classAbstractRequest.Builder<String,
SeekToPositionInCurrentlyPlayingTrackRequest.Builder> - Returns:
- This instance.
-