Skip to content

Commit acc59d1

Browse files
GruhlumJonas Dellinger
authored andcommitted
Adds collaborative bool and description to UpdatePlaylist
1 parent 5c2a901 commit acc59d1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎SpotifyAPI.Web/SpotifyWebAPI.cs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,15 +1438,21 @@ public Task<FullPlaylist> CreatePlaylistAsync(string userId, string playlistName
14381438
/// <param name="playlistId">The Spotify ID for the playlist.</param>
14391439
/// <param name="newName">The new name for the playlist, for example "My New Playlist Title".</param>
14401440
/// <param name="newPublic">If true the playlist will be public, if false it will be private.</param>
1441+
/// <param name="newCollaborative">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.</param>
1442+
/// <param name="newDescription">Value for playlist description as displayed in Spotify Clients and in the Web API.</param>
14411443
/// <returns></returns>
14421444
/// <remarks>AUTH NEEDED</remarks>
1443-
public ErrorResponse UpdatePlaylist(string userId, string playlistId, string newName = null, bool? newPublic = null)
1445+
public ErrorResponse UpdatePlaylist(string userId, string playlistId, string newName = null, bool? newPublic = null, bool? newCollaborative = null, string newDescription = null)
14441446
{
14451447
JObject body = new JObject();
14461448
if (newName != null)
14471449
body.Add("name", newName);
14481450
if (newPublic != null)
14491451
body.Add("public", newPublic);
1452+
if (newCollaborative != null)
1453+
body.Add("collaborative", newCollaborative);
1454+
if (newDescription != null)
1455+
body.Add("description", newDescription);
14501456
return UploadData<ErrorResponse>(_builder.UpdatePlaylist(userId, playlistId), body.ToString(Formatting.None), "PUT") ?? new ErrorResponse();
14511457
}
14521458

0 commit comments

Comments
 (0)