Class CreatePlaylistRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<Playlist, CreatePlaylistRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<Playlist, CreatePlaylistRequest.Builder>
se.michaelthelin.spotify.requests.data.playlists.CreatePlaylistRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<Playlist, CreatePlaylistRequest.Builder>
- Enclosing class:
CreatePlaylistRequest
public static final class CreatePlaylistRequest.Builder
extends AbstractDataRequest.Builder<Playlist, CreatePlaylistRequest.Builder>
Builder class for building a
CreatePlaylistRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()The request build method.collaborative(Boolean collaborative) The collaborative body parameter setter.description(String description) The description body parameter setter.The name body parameter setter.The public body parameter setter.protected CreatePlaylistRequest.Builderself()Return this instance to simulate a self-type.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 newCreatePlaylistRequest.Builderinstance.- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.
-
-
Method Details
-
name
The name body parameter setter.- Parameters:
name- Required. The name for the new playlist, for example"Your Coolest Playlist". This name does not need to be unique; a user may have several playlists with the same name.- Returns:
- A
CreatePlaylistRequest.Builder.
-
public_
The public body parameter setter.- Parameters:
public_- Optional. Defaults totrue. The playlist's public/private status (if it should be added to the user's profile or not):truethe playlist will be public,falsethe playlist will be private. To be able to create private playlists, the user must have granted theplaylist-modify-privatescope. For more about public/private status, see Working with Playlists- Returns:
- A
CreatePlaylistRequest.Builder.
-
collaborative
The collaborative body parameter setter.- Parameters:
collaborative- Optional. Defaults tofalse. Iftruethe playlist will be collaborative. Note: to create a collaborative playlist you must also setpublictofalse. To create collaborative playlists you must have grantedplaylist-modify-privateandplaylist-modify-publicscopes.- Returns:
- A
CreatePlaylistRequest.Builder.
-
description
The description body parameter setter.- Parameters:
description- Optional. value for playlist description as displayed in Spotify Clients and in the Web API.- Returns:
- A
CreatePlaylistRequest.Builder.
-
build
-
self
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<Playlist, CreatePlaylistRequest.Builder>- Returns:
- This instance.
-