Class ReorderPlaylistsItemsRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<SnapshotResult,ReorderPlaylistsItemsRequest.Builder>
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 a
ReorderPlaylistsItemsRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The request build method.insert_before
(Integer insert_before) The insert before setter.playlist_id
(String playlist_id) The playlist ID setter.range_length
(Integer range_length) The range length setter.range_start
(Integer range_start) The range start setter.protected ReorderPlaylistsItemsRequest.Builder
self()
Return this instance to simulate a self-type.snapshot_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 Details
-
Builder
Create a newReorderPlaylistsItemsRequest.Builder
.Reordering items in the current user's public playlists requires authorization of the
playlist-modify-public
scope; reordering items in the current user's private playlist (including collaborative playlists) requires theplaylist-modify-private
scope.- Parameters:
accessToken
- Required. A valid access token from the Spotify Accounts service.- See Also:
-
-
Method Details
-
playlist_id
The playlist ID setter.- Parameters:
playlist_id
- The Spotify ID for the playlist.- Returns:
- A
ReorderPlaylistsItemsRequest.Builder
. - See Also:
-
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
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
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
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:
-
build
The request build method.- Returns:
- A custom
ReorderPlaylistsItemsRequest
.
-
self
Description copied from class:AbstractRequest.Builder
Return this instance to simulate a self-type.- Specified by:
self
in classAbstractRequest.Builder<SnapshotResult,
ReorderPlaylistsItemsRequest.Builder> - Returns:
- This instance.
-