From c5485a7183fc4c48b7a419975cdea6c46c88a600 Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Sun, 27 Nov 2022 13:07:50 +0100 Subject: [PATCH] replace body ids with query parameter ids --- SpotifyAPI.Web/Clients/LibraryClient.cs | 6 +++--- .../Models/Request/LibraryRemoveEpisodesRequest.cs | 2 +- SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs | 2 +- SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs | 6 +++--- SpotifyAPI.Web/Models/Request/LibrarySaveEpisodesRequest.cs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SpotifyAPI.Web/Clients/LibraryClient.cs b/SpotifyAPI.Web/Clients/LibraryClient.cs index 8a6f71ca..01333c45 100644 --- a/SpotifyAPI.Web/Clients/LibraryClient.cs +++ b/SpotifyAPI.Web/Clients/LibraryClient.cs @@ -98,7 +98,7 @@ namespace SpotifyAPI.Web { Ensure.ArgumentNotNull(request, nameof(request)); - var statusCode = await API.Delete(SpotifyUrls.LibraryShows(), null, request.BuildBodyParams(), cancel).ConfigureAwait(false); + var statusCode = await API.Delete(SpotifyUrls.LibraryShows(), request.BuildQueryParams(), null, cancel).ConfigureAwait(false); return statusCode == HttpStatusCode.OK; } @@ -106,7 +106,7 @@ namespace SpotifyAPI.Web { Ensure.ArgumentNotNull(request, nameof(request)); - var statusCode = await API.Delete(SpotifyUrls.LibraryTracks(), null, request.BuildBodyParams(), cancel).ConfigureAwait(false); + var statusCode = await API.Delete(SpotifyUrls.LibraryTracks(), request.BuildQueryParams(), null, cancel).ConfigureAwait(false); return statusCode == HttpStatusCode.OK; } @@ -114,7 +114,7 @@ namespace SpotifyAPI.Web { Ensure.ArgumentNotNull(request, nameof(request)); - var statusCode = await API.Delete(SpotifyUrls.LibraryEpisodes(), null, request.BuildBodyParams(), cancel).ConfigureAwait(false); + var statusCode = await API.Delete(SpotifyUrls.LibraryEpisodes(), request.BuildQueryParams(), null, cancel).ConfigureAwait(false); return statusCode == HttpStatusCode.OK; } diff --git a/SpotifyAPI.Web/Models/Request/LibraryRemoveEpisodesRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryRemoveEpisodesRequest.cs index f0b5d070..de844d23 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryRemoveEpisodesRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryRemoveEpisodesRequest.cs @@ -21,7 +21,7 @@ namespace SpotifyAPI.Web /// A comma-separated list of Spotify IDs for the shows to be deleted from the user’s library. /// /// - [BodyParam("ids")] + [QueryParam("ids")] public IList Ids { get; } } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs index 05a462af..cc164929 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs @@ -21,7 +21,7 @@ namespace SpotifyAPI.Web /// A comma-separated list of Spotify IDs for the shows to be deleted from the user’s library. /// /// - [BodyParam("ids")] + [QueryParam("ids")] public IList Ids { get; } } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs index e21d1900..dfb18f17 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs @@ -9,7 +9,7 @@ namespace SpotifyAPI.Web /// /// /// A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. - /// Maximum: 50 IDs. + /// Maximum: 20 IDs. /// public LibraryRemoveTracksRequest(IList ids) { @@ -20,10 +20,10 @@ namespace SpotifyAPI.Web /// /// A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. - /// Maximum: 50 IDs. + /// Maximum: 20 IDs. /// /// - [BodyParam("ids")] + [QueryParam("ids")] public IList Ids { get; } } } diff --git a/SpotifyAPI.Web/Models/Request/LibrarySaveEpisodesRequest.cs b/SpotifyAPI.Web/Models/Request/LibrarySaveEpisodesRequest.cs index 89e3dff8..e27dc14a 100644 --- a/SpotifyAPI.Web/Models/Request/LibrarySaveEpisodesRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibrarySaveEpisodesRequest.cs @@ -16,7 +16,7 @@ namespace SpotifyAPI.Web } /// - /// A comma-separated list of the Spotify IDs. + /// A comma-separated list of the Spotify IDs. /// Maximum: 50 IDs. /// ///