change_playlist_details: Change a playlist’s name and public/private state. (The user...

View source: R/playlists.R

change_playlist_detailsR Documentation

Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)

Description

Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)

Usage

change_playlist_details(
  playlist_id,
  name = NULL,
  public = NULL,
  collaborative = NULL,
  description = NULL,
  authorization = get_spotify_authorization_code()
)

Arguments

playlist_id

Required. The Spotify ID for the playlist.

name

Optional String containing 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.

public

Optional. Boolean. If TRUE the playlist will be public. If FALSE it will be private.

collaborative

Optional. Boolean. If TRUE the playlist will become collaborative and other users will be able to modify the playlist in their Spotify client.Note: you can only set collaborative to TRUE on non-public playlists.

description

Optional. String containing the playlist description as displayed in Spotify Clients and in the Web API.

authorization

Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to spotifyr::get_spotify_authorization_code(). The access token must have been issued on behalf of the current user.
Changing a public playlist for a user requires authorization of the playlist-modify-public scope; changing a private playlist requires the playlist-modify-private scope. See Using Scopes.

Value

The response from the Spotify Web API on the PUT request, with a meaningful error message if the operation was not successful.

See Also

Other playlist functions: add_tracks_to_playlist(), check_users_following(), create_playlist(), get_my_playlists(), get_playlist(), get_user_playlists(), remove_tracks_from_playlist(), tidy()


spotifyr documentation built on Oct. 30, 2024, 9:13 a.m.