Class CreatePlaylistRequest

java.lang.Object
de.sonallux.spotify.api.apis.playlists.CreatePlaylistRequest

public class CreatePlaylistRequest extends Object

Create Playlist request

Required OAuth scopes

playlist-modify-public, playlist-modify-private

Response

A playlist

  • Constructor Details

    • CreatePlaylistRequest

      public CreatePlaylistRequest(ApiClient apiClient, String userId, String name)
      Create 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 Details

    • _public

      public CreatePlaylistRequest _public(boolean _public)
      Parameters:
      _public -

      Defaults to true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope

      Returns:
      this request
    • collaborative

      public CreatePlaylistRequest collaborative(boolean collaborative)
      Parameters:
      collaborative -

      Defaults to false. If true the playlist will be collaborative. Note: to create a collaborative playlist you must also set public to false. To create collaborative playlists you must have granted playlist-modify-private and playlist-modify-public scopes.

      Returns:
      this request
    • description

      public CreatePlaylistRequest description(String description)
      Parameters:
      description -

      value for playlist description as displayed in Spotify Clients and in the Web API.

      Returns:
      this request
    • build

      public ApiCall<Playlist> build()
      Build the request into an executable api call
      Returns:
      an executable api call