Class StartUsersPlaybackRequest
Start/Resume Playback request
Required OAuth scopes
user-modify-playback-state
Response
Playback started
-
Constructor Summary
ConstructorsConstructorDescriptionStartUsersPlaybackRequest(ApiClient apiClient) Start/Resume Playback request -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the request into an executable api callcontextUri(String contextUri) positionMs(int positionMs)
-
Constructor Details
-
StartUsersPlaybackRequest
Start/Resume Playback request- Parameters:
apiClient-The API client
-
-
Method Details
-
deviceId
- Parameters:
deviceId-The id of the device this command is targeting. If not supplied, the user's currently active device is the target.
- Returns:
- this request
-
contextUri
- Parameters:
contextUri-Optional. Spotify URI of the context to play. Valid contexts are albums, artists & playlists.
{context_uri:"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"}- Returns:
- this request
-
uris
- Parameters:
uris-Optional. A JSON array of the Spotify track URIs to play. For example:
{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M"]}- Returns:
- this request
-
offset
- Parameters:
offset-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:
- this request
-
positionMs
- Parameters:
positionMs-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.
- Returns:
- this request
-
build
Build the request into an executable api call- Returns:
- an executable api call
-