Class CreatePlaylistRequest
- java.lang.Object
-
- de.sonallux.spotify.api.apis.playlists.CreatePlaylistRequest
-
public class CreatePlaylistRequest extends Object
Create a Playlist requestRequired OAuth scopes
playlist-modify-public, playlist-modify-privateResponse
On success, the response body contains the created playlist object in JSON format and the HTTP status code in the response header is
200OK or201Created. There is also aLocationresponse header giving the Web API endpoint for the new playlist.On error, the header status code is an error code and the response body contains an error object. Trying to create a playlist when you do not have the user's authorization returns error
403Forbidden.
-
-
Constructor Summary
Constructors Constructor Description CreatePlaylistRequest(ApiClient apiClient, String userId, String name)Create a Playlist request
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreatePlaylistRequest_public(boolean _public)Defaults totrue.ApiCall<Playlist>build()Build the request into an executable callCreatePlaylistRequestcollaborative(boolean collaborative)Defaults tofalse.CreatePlaylistRequestdescription(String description)value for playlist description as displayed in Spotify Clients and in the Web API.
-
-
-
Constructor Detail
-
CreatePlaylistRequest
public CreatePlaylistRequest(ApiClient apiClient, String userId, String name)
Create a Playlist request
- Parameters:
apiClient-The API client
userId-The user's Spotify user ID.
name-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.
-
-
Method Detail
-
_public
public CreatePlaylistRequest _public(boolean _public)
Defaults to
true. Iftruethe playlist will be public, iffalseit will be private. To be able to create private playlists, the user must have granted theplaylist-modify-privatescope
-
collaborative
public CreatePlaylistRequest collaborative(boolean collaborative)
Defaults to
false. Iftruethe playlist will be collaborative. Note that to create a collaborative playlist you must also setpublictofalse. To create collaborative playlists you must have grantedplaylist-modify-privateandplaylist-modify-publicscopes .
-
description
public CreatePlaylistRequest description(String description)
value for playlist description as displayed in Spotify Clients and in the Web API.
-
-