EVOLUTION-MANAGER
Edit File: create_playlist.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Create Playlist for User</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for create_playlist {spotifyr}"><tr><td>create_playlist {spotifyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create Playlist for User</h2> <h3>Description</h3> <p>Create a playlist for a Spotify user. The playlist will be empty until you add tracks. </p> <h3>Usage</h3> <pre> create_playlist( user_id, name, public = TRUE, collaborative = FALSE, description = NULL, authorization = get_spotify_authorization_code() ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>user_id</code></td> <td> <p>Required. The user's <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify user ID</a>.</p> </td></tr> <tr valign="top"><td><code>name</code></td> <td> <p>Required. String containing the name for the new playlist, for example <code>"Your Coolest Playlist"</code>. This name does not need to be unique; a user may have several playlists with the same name.</p> </td></tr> <tr valign="top"><td><code>public</code></td> <td> <p>Optional. Boolean. Defaults to <code>TRUE</code>. If <code>TRUE</code> the playlist will be public. If <code>FALSE</code> it will be private. To be able to create private playlists, the user must have granted the <code>playlist-modify-private</code> <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/#list-of-scopes">scope</a></p> </td></tr> <tr valign="top"><td><code>collaborative</code></td> <td> <p>Optional. Boolean. Defaults to <code>FALSE</code>. If <code>TRUE</code> the playlist will be collaborative. Note that to create a collaborative playlist you must also set <code>public</code> to <code>FALES</code>. To create collaborative playlists you must have granted <code>playlist-modify-private</code> and <code>playlist-modify-public</code> <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/#list-of-scopes">scopes</a>.</p> </td></tr> <tr valign="top"><td><code>description</code></td> <td> <p>Optional. String containing the playlist description as displayed in Spotify Clients and in the Web API.</p> </td></tr> <tr valign="top"><td><code>authorization</code></td> <td> <p>Required. A valid access token from the Spotify Accounts service. See the <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/">Web API authorization Guide</a> for more details. Defaults to <code>spotifyr::get_spotify_authorization_code()</code>. The access token must have been issued on behalf of the current user. <br /> Creating a public playlist for a user requires authorization of the <code>playlist-modify-public</code> scope; creating a private playlist requires the <code>playlist-modify-private</code> scope. See <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/#list-of-scopes">Using Scopes</a>.</p> </td></tr> </table> <h3>Value</h3> <p>The response from the Spotify Web API on the <code>POST</code> request, with a meaningful error message if the operation was not successful. </p> <h3>See Also</h3> <p>Other playlist functions: <code><a href="add_tracks_to_playlist.html">add_tracks_to_playlist</a>()</code>, <code><a href="change_playlist_details.html">change_playlist_details</a>()</code>, <code><a href="check_users_following.html">check_users_following</a>()</code>, <code><a href="get_my_playlists.html">get_my_playlists</a>()</code>, <code><a href="get_playlist.html">get_playlist</a>()</code>, <code><a href="get_user_playlists.html">get_user_playlists</a>()</code>, <code><a href="remove_tracks_from_playlist.html">remove_tracks_from_playlist</a>()</code>, <code><a href="tidy.html">tidy</a>()</code> </p> <hr /><div style="text-align: center;">[Package <em>spotifyr</em> version 2.2.3 <a href="00Index.html">Index</a>]</div> </body></html>