Class SetVolumeForUsersPlaybackRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<String,SetVolumeForUsersPlaybackRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<String,SetVolumeForUsersPlaybackRequest.Builder>
se.michaelthelin.spotify.requests.data.player.SetVolumeForUsersPlaybackRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<String,
SetVolumeForUsersPlaybackRequest.Builder>
- Enclosing class:
SetVolumeForUsersPlaybackRequest
public static final class SetVolumeForUsersPlaybackRequest.Builder
extends AbstractDataRequest.Builder<String,SetVolumeForUsersPlaybackRequest.Builder>
Builder class for building a
SetVolumeForUsersPlaybackRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The build method.The device ID setter.protected SetVolumeForUsersPlaybackRequest.Builder
self()
Return this instance to simulate a self-type.volume_percent
(Integer volume_percent) The volume percentage setter.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 newSetVolumeForUsersPlaybackRequest.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
-
volume_percent
The volume percentage setter.- Parameters:
volume_percent
- Required. The volume to set. Must be a value from 0 to 100 inclusive.- Returns:
- A
SetVolumeForUsersPlaybackRequest.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
SetVolumeForUsersPlaybackRequest.Builder
. - See Also:
-
build
The build method.- Returns:
- A custom
SetVolumeForUsersPlaybackRequest
.
-
self
Description copied from class:AbstractRequest.Builder
Return this instance to simulate a self-type.- Specified by:
self
in classAbstractRequest.Builder<String,
SetVolumeForUsersPlaybackRequest.Builder> - Returns:
- This instance.
-