diff --git a/SpotifyAPI.Web/Clients/ArtistsClient.cs b/SpotifyAPI.Web/Clients/ArtistsClient.cs index fb59fd49..533e0f0c 100644 --- a/SpotifyAPI.Web/Clients/ArtistsClient.cs +++ b/SpotifyAPI.Web/Clients/ArtistsClient.cs @@ -19,6 +19,7 @@ namespace SpotifyAPI.Web public Task Get(string artistId, ArtistRequest request, CancellationToken cancel = default) { Ensure.ArgumentNotNullOrEmptyString(artistId, nameof(artistId)); + Ensure.ArgumentNotNull(request, nameof(request)); return API.Get(URLs.Artist(artistId), request.BuildQueryParams(), cancel); } @@ -48,6 +49,7 @@ namespace SpotifyAPI.Web public Task GetRelatedArtists(string artistId, ArtistsRelatedArtistsRequest request, CancellationToken cancel = default) { Ensure.ArgumentNotNullOrEmptyString(artistId, nameof(artistId)); + Ensure.ArgumentNotNull(request, nameof(request)); return API.Get(URLs.ArtistRelatedArtists(artistId), request.BuildQueryParams(), cancel); } diff --git a/SpotifyAPI.Web/Models/Request/ArtistRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistRequest.cs index 12d0d9a3..896be83c 100644 --- a/SpotifyAPI.Web/Models/Request/ArtistRequest.cs +++ b/SpotifyAPI.Web/Models/Request/ArtistRequest.cs @@ -1,5 +1,3 @@ -using System.Collections.Generic; - namespace SpotifyAPI.Web { public class ArtistRequest : RequestParams diff --git a/SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs b/SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs index 506e2f7e..e8c43870 100644 --- a/SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs @@ -15,8 +15,8 @@ namespace SpotifyAPI.Web /// /// [QueryParam("offset")] - public int? Offset { get; set; } - + public int? Offset { get; set; } + /// /// The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, /// joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". @@ -25,8 +25,7 @@ namespace SpotifyAPI.Web /// the category strings returned will be in the Spotify default language (American English). /// /// - [QueryParam("locale")] - public string? Locale { get; set; } + [QueryParam("locale")] + public string? Locale { get; set; } } } -