Class ReorderPlaylistsItemsRequest.Builder
- java.lang.Object
-
- se.michaelthelin.spotify.requests.AbstractRequest.Builder<T,BT>
-
- se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<SnapshotResult,ReorderPlaylistsItemsRequest.Builder>
-
- se.michaelthelin.spotify.requests.data.playlists.ReorderPlaylistsItemsRequest.Builder
-
- All Implemented Interfaces:
IRequest.Builder<SnapshotResult,ReorderPlaylistsItemsRequest.Builder>
- Enclosing class:
- ReorderPlaylistsItemsRequest
public static final class ReorderPlaylistsItemsRequest.Builder extends AbstractDataRequest.Builder<SnapshotResult,ReorderPlaylistsItemsRequest.Builder>
Builder class for building aReorderPlaylistsItemsRequest.
-
-
Constructor Summary
Constructors Constructor Description Builder(String accessToken)Create a newReorderPlaylistsItemsRequest.Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReorderPlaylistsItemsRequestbuild()The request build method.ReorderPlaylistsItemsRequest.Builderinsert_before(Integer insert_before)The insert before setter.ReorderPlaylistsItemsRequest.Builderplaylist_id(String playlist_id)The playlist ID setter.ReorderPlaylistsItemsRequest.Builderrange_length(Integer range_length)The range length setter.ReorderPlaylistsItemsRequest.Builderrange_start(Integer range_start)The range start setter.protected ReorderPlaylistsItemsRequest.Builderself()Return this instance to simulate a self-type.ReorderPlaylistsItemsRequest.Buildersnapshot_id(String snapshot_id)The playlist snapshot ID setter.-
Methods inherited from class se.michaelthelin.spotify.requests.AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setScheme
-
-
-
-
Constructor Detail
-
Builder
public Builder(String accessToken)
Create a newReorderPlaylistsItemsRequest.Builder.Reordering items in the current user's public playlists requires authorization of the
playlist-modify-publicscope; reordering items in the current user's private playlist (including collaborative playlists) requires theplaylist-modify-privatescope.- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.- See Also:
- Spotify: Using Scopes
-
-
Method Detail
-
playlist_id
public ReorderPlaylistsItemsRequest.Builder playlist_id(String playlist_id)
The playlist ID setter.- Parameters:
playlist_id- The Spotify ID for the playlist.- Returns:
- A
ReorderPlaylistsItemsRequest.Builder. - See Also:
- Spotify: URIs & IDs
-
range_start
public ReorderPlaylistsItemsRequest.Builder range_start(Integer range_start)
The range start setter.- Parameters:
range_start- Required. The position of the first item to be reordered.- Returns:
- A
ReorderPlaylistsItemsRequest.Builder.
-
range_length
public ReorderPlaylistsItemsRequest.Builder range_length(Integer range_length)
The range length setter.- Parameters:
range_length- Optional. The amount of items to be reordered. Defaults to 1 if not set.- Returns:
- A
ReorderPlaylistsItemsRequest.Builder.
-
insert_before
public ReorderPlaylistsItemsRequest.Builder insert_before(Integer insert_before)
The insert before setter.- Parameters:
insert_before- Required. The position where the items should be inserted. To reorder the items to the end of the playlist, simply set insert_before to the position after the last item.- Returns:
- A
ReorderPlaylistsItemsRequest.Builder.
-
snapshot_id
public ReorderPlaylistsItemsRequest.Builder snapshot_id(String snapshot_id)
The playlist snapshot ID setter.- Parameters:
snapshot_id- Optional. The playlist's snapshot ID against which you want to make the changes.- Returns:
- A
ReorderPlaylistsItemsRequest.Builder. - See Also:
- Spotify: Version Control and Snapshots
-
build
public ReorderPlaylistsItemsRequest build()
The request build method.- Returns:
- A custom
ReorderPlaylistsItemsRequest.
-
self
protected ReorderPlaylistsItemsRequest.Builder self()
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<SnapshotResult,ReorderPlaylistsItemsRequest.Builder>- Returns:
- This instance.
-
-