From acc59d11bfbefaa9175dfd64e8ac1a3fe43adb72 Mon Sep 17 00:00:00 2001 From: Gruhlum Date: Fri, 24 Aug 2018 13:07:01 +0200 Subject: [PATCH] Adds collaborative bool and description to UpdatePlaylist --- SpotifyAPI.Web/SpotifyWebAPI.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SpotifyAPI.Web/SpotifyWebAPI.cs b/SpotifyAPI.Web/SpotifyWebAPI.cs index 90f26e49..3b68d09e 100644 --- a/SpotifyAPI.Web/SpotifyWebAPI.cs +++ b/SpotifyAPI.Web/SpotifyWebAPI.cs @@ -1438,15 +1438,21 @@ namespace SpotifyAPI.Web /// The Spotify ID for the playlist. /// The new name for the playlist, for example "My New Playlist Title". /// If true the playlist will be public, if false it will be private. + /// 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. + /// Value for playlist description as displayed in Spotify Clients and in the Web API. /// /// AUTH NEEDED - public ErrorResponse UpdatePlaylist(string userId, string playlistId, string newName = null, bool? newPublic = null) + public ErrorResponse UpdatePlaylist(string userId, string playlistId, string newName = null, bool? newPublic = null, bool? newCollaborative = null, string newDescription = null) { JObject body = new JObject(); if (newName != null) body.Add("name", newName); if (newPublic != null) body.Add("public", newPublic); + if (newCollaborative != null) + body.Add("collaborative", newCollaborative); + if (newDescription != null) + body.Add("description", newDescription); return UploadData(_builder.UpdatePlaylist(userId, playlistId), body.ToString(Formatting.None), "PUT") ?? new ErrorResponse(); }