IRequest.Builderpublic static final class StartResumeUsersPlaybackRequest.Builder extends AbstractDataRequest.Builder<StartResumeUsersPlaybackRequest.Builder>
StartResumeUsersPlaybackRequest.| Constructor | Description |
|---|---|
Builder(String accessToken) |
Create a new
StartResumeUsersPlaybackRequest.Builder. |
| Modifier and Type | Method | Description |
|---|---|---|
StartResumeUsersPlaybackRequest |
build() |
The request build method.
|
StartResumeUsersPlaybackRequest.Builder |
context_uri(String context_uri) |
The context URI setter.
|
StartResumeUsersPlaybackRequest.Builder |
device_id(String device_id) |
The device ID setter.
|
StartResumeUsersPlaybackRequest.Builder |
offset(com.google.gson.JsonObject offset) |
The offset setter.
|
StartResumeUsersPlaybackRequest.Builder |
position_ms(Integer position_ms) |
The position setter.
|
StartResumeUsersPlaybackRequest.Builder |
uris(com.google.gson.JsonArray uris) |
The URI setter.
|
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setSchemepublic Builder(String accessToken)
StartResumeUsersPlaybackRequest.Builder.
Your access token must have the user-modify-playback-state scope authorized in order to control playback.
accessToken - Required. A valid access token from the Spotify Accounts service.public StartResumeUsersPlaybackRequest.Builder device_id(String device_id)
device_id - Optional. The ID of the device this command is targeting. If not supplied, the
user's currently active device is the target.StartResumeUsersPlaybackRequest.Builder.public StartResumeUsersPlaybackRequest.Builder context_uri(String context_uri)
context_uri - Optional. Spotify URI of the context to play.
Valid contexts are albums, artists and playlists.StartResumeUsersPlaybackRequest.Builder.public StartResumeUsersPlaybackRequest.Builder uris(com.google.gson.JsonArray uris)
uris - Optional. A JSON array of the Spotify track URIs to play.StartResumeUsersPlaybackRequest.Builder.public StartResumeUsersPlaybackRequest.Builder offset(com.google.gson.JsonObject offset)
Note: If context_uri(String) has been set and corresponds to an album or playlist object, an
offset can be specified either by track uri OR position. If both are present the request will
return an error. If incorrect values are provided for position or uri, the request may be
accepted but with an unpredictable resulting action on playback.
offset - Optional. Indicates from where in the context playback should start. Only available when
context_uri(String) corresponds to an album or playlist object, or when the
uris(JsonArray) parameter is used. position parameter in the
offset object is zero based and can’t be negative. uri parameter in the
offset object is a string representing the URI of the item to start at.StartResumeUsersPlaybackRequest.Builder.public StartResumeUsersPlaybackRequest.Builder position_ms(Integer position_ms)
position_ms - Optional. Indicates from what position to start playback. 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.StartResumeUsersPlaybackRequest.Builder.public StartResumeUsersPlaybackRequest build()
StartResumeUsersPlaybackRequest.Copyright © 2019. All rights reserved.