Class StartResumePlaybackRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<String, StartResumePlaybackRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<String, StartResumePlaybackRequest.Builder>
se.michaelthelin.spotify.requests.data.player.StartResumePlaybackRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<String, StartResumePlaybackRequest.Builder>
- Enclosing class:
StartResumePlaybackRequest
public static final class StartResumePlaybackRequest.Builder
extends AbstractDataRequest.Builder<String, StartResumePlaybackRequest.Builder>
Builder class for building a
StartResumePlaybackRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()The request build method.context_uri(String context_uri) The context_uri body parameter setter.The device_id query parameter setter.The offset body parameter setter.position_ms(Integer position_ms) The position_ms body parameter setter.protected StartResumePlaybackRequest.Builderself()Return this instance to simulate a self-type.The uris body parameter setter.Methods inherited from class AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setSchemeModifier and TypeMethodDescriptionsetBody(org.apache.hc.core5.http.HttpEntity httpEntity) Set the body for the request.setBodyParameter(String name, X value) Set a body parameter for the request.setContentType(org.apache.hc.core5.http.ContentType contentType) Set the content type for the request.setDefaults(IHttpManager httpManager, String scheme, String host, Integer port) Set default values for the request.Set a header for the request.Set the host for the request.setHttpManager(IHttpManager httpManager) Set the HTTP manager for the request.Set the path for the request.setPathParameter(String name, String value) Set a path parameter for the request.Set the port for the request.setQueryParameter(String name, X value) Set a query parameter for the request.Set the scheme for the request.
-
Constructor Details
-
Builder
Create a newStartResumePlaybackRequest.Builderinstance.- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.
-
-
Method Details
-
device_id
The device_id query parameter 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
StartResumePlaybackRequest.Builder.
-
context_uri
The context_uri body parameter setter.- Parameters:
context_uri- Optional. Optional. Spotify URI of the context to play. Valid contexts are albums, artists & playlists.{context_uri:"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"}- Returns:
- A
StartResumePlaybackRequest.Builder.
-
uris
The uris body parameter setter.- Parameters:
uris- Optional. Optional. A JSON array of the Spotify track URIs to play. For example:{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M"]}- Returns:
- A
StartResumePlaybackRequest.Builder.
-
offset
The offset body parameter setter.- Parameters:
offset- Optional. Optional. Indicates from where in the context playback should start. Only available when context_uri corresponds to an album or playlist object "position" is zero based and can’t be negative. Example:"offset": {"position": 5}"uri" is a string representing the uri of the item to start at. Example:"offset": {"uri": "spotify:track:1301WleyT98MSxVHPZCA6M"}- Returns:
- A
StartResumePlaybackRequest.Builder.
-
position_ms
The position_ms body parameter setter.- Parameters:
position_ms- Optional. integer- Returns:
- A
StartResumePlaybackRequest.Builder.
-
build
The request build method.- Returns:
- A
StartResumePlaybackRequest.
-
self
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<String, StartResumePlaybackRequest.Builder>- Returns:
- This instance.
-