Class UpdatePlaylistsItemsReorderRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<SnapshotResult, UpdatePlaylistsItemsReorderRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<SnapshotResult, UpdatePlaylistsItemsReorderRequest.Builder>
se.michaelthelin.spotify.requests.data.playlists.UpdatePlaylistsItemsReorderRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<SnapshotResult, UpdatePlaylistsItemsReorderRequest.Builder>
- Enclosing class:
UpdatePlaylistsItemsReorderRequest
public static final class UpdatePlaylistsItemsReorderRequest.Builder
extends AbstractDataRequest.Builder<SnapshotResult, UpdatePlaylistsItemsReorderRequest.Builder>
Builder class for building a
UpdatePlaylistsItemsReorderRequest.-
Constructor Summary
Constructors -
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.self()Return this instance to simulate a self-type.snapshot_id(String snapshot_id) The playlist snapshot ID setter.Methods inherited from class AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setSchemeModifier and TypeMethodDescriptionsetBody(org.apache.hc.core5.http.HttpEntity httpEntity) Set the body for the request.setBodyParameter(String name, X value) Set a body parameter for the request.setContentType(org.apache.hc.core5.http.ContentType contentType) Set the content type for the request.setDefaults(IHttpManager httpManager, String scheme, String host, Integer port) Set default values for the request.Set a header for the request.Set the host for the request.setHttpManager(IHttpManager httpManager) Set the HTTP manager for the request.Set the path for the request.setPathParameter(String name, String value) Set a path parameter for the request.Set the port for the request.setQueryParameter(String name, X value) Set a query parameter for the request.Set the scheme for the request.
-
Constructor Details
-
Builder
Create a newUpdatePlaylistsItemsReorderRequest.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:
-
-
Method Details
-
playlist_id
The playlist ID setter.- Parameters:
playlist_id- The Spotify ID for the playlist.- Returns:
- A
UpdatePlaylistsItemsReorderRequest.Builder. - See Also:
-
range_start
The range start setter.- Parameters:
range_start- Required. The position of the first item to be reordered.- Returns:
- A
UpdatePlaylistsItemsReorderRequest.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
UpdatePlaylistsItemsReorderRequest.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
UpdatePlaylistsItemsReorderRequest.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
UpdatePlaylistsItemsReorderRequest.Builder. - See Also:
-
build
The request build method.- Returns:
- A custom
UpdatePlaylistsItemsReorderRequest.
-
self
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<SnapshotResult, UpdatePlaylistsItemsReorderRequest.Builder>- Returns:
- This instance.
-