From 952d46f58f6a5159ab10c90b148fcbd2b566b63c Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Thu, 27 Aug 2020 13:55:42 +0200 Subject: [PATCH] Add Positions body param to PlaylistRemoveItemsRequest, #501 --- .../Request/PlaylistRemoveItemsRequest.cs | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/SpotifyAPI.Web/Models/Request/PlaylistRemoveItemsRequest.cs b/SpotifyAPI.Web/Models/Request/PlaylistRemoveItemsRequest.cs index 8e68dccb..595f2805 100644 --- a/SpotifyAPI.Web/Models/Request/PlaylistRemoveItemsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlaylistRemoveItemsRequest.cs @@ -5,22 +5,6 @@ namespace SpotifyAPI.Web { public class PlaylistRemoveItemsRequest : RequestParams { - /// - /// - /// - /// - /// An array of objects containing Spotify URIs of the tracks or episodes to remove. - /// For example: { "tracks": [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" }, - /// { "uri": "spotify:track:1301WleyT98MSxVHPZCA6M" }] }. - /// A maximum of 100 objects can be sent at once. - /// - public PlaylistRemoveItemsRequest(IList tracks) - { - Ensure.ArgumentNotNullOrEmptyList(tracks, nameof(tracks)); - - Tracks = tracks; - } - /// /// An array of objects containing Spotify URIs of the tracks or episodes to remove. /// For example: { "tracks": [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" }, @@ -29,7 +13,15 @@ namespace SpotifyAPI.Web /// /// [BodyParam("tracks")] - public IList Tracks { get; } + public IList? Tracks { get; set; } + + /// + /// An array of positions to delete. This also supports local tracks. + /// SnapshotId MUST be supplied when using this parameter + /// + /// + [BodyParam("positions")] + public IList? Positions { get; set; } /// /// The playlist’s snapshot ID against which you want to make the changes.