Skip to content

Commit dcec546

Browse files
committed
fix null checks and duplicate EOL
1 parent d505982 commit dcec546

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎SpotifyAPI.Web/Clients/ArtistsClient.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public Task<FullArtist> Get(string artistId, CancellationToken cancel = default)
1919
public Task<FullArtist> Get(string artistId, ArtistRequest request, CancellationToken cancel = default)
2020
{
2121
Ensure.ArgumentNotNullOrEmptyString(artistId, nameof(artistId));
22+
Ensure.ArgumentNotNull(request, nameof(request));
2223

2324
return API.Get<FullArtist>(URLs.Artist(artistId), request.BuildQueryParams(), cancel);
2425
}
@@ -48,6 +49,7 @@ public Task<ArtistsRelatedArtistsResponse> GetRelatedArtists(string artistId, Ca
4849
public Task<ArtistsRelatedArtistsResponse> GetRelatedArtists(string artistId, ArtistsRelatedArtistsRequest request, CancellationToken cancel = default)
4950
{
5051
Ensure.ArgumentNotNullOrEmptyString(artistId, nameof(artistId));
52+
Ensure.ArgumentNotNull(request, nameof(request));
5153

5254
return API.Get<ArtistsRelatedArtistsResponse>(URLs.ArtistRelatedArtists(artistId), request.BuildQueryParams(), cancel);
5355
}

‎SpotifyAPI.Web/Models/Request/ArtistRequest.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections.Generic;
2-
31
namespace SpotifyAPI.Web
42
{
53
public class ArtistRequest : RequestParams

‎SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class PlaylistGetUsersRequest : RequestParams
1515
/// </summary>
1616
/// <value></value>
1717
[QueryParam("offset")]
18-
public int? Offset { get; set; }
19-
18+
public int? Offset { get; set; }
19+
2020
/// <summary>
2121
/// The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code,
2222
/// joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)".
@@ -25,8 +25,7 @@ public class PlaylistGetUsersRequest : RequestParams
2525
/// the category strings returned will be in the Spotify default language (American English).
2626
/// </summary>
2727
/// <value></value>
28-
[QueryParam("locale")]
29-
public string? Locale { get; set; }
28+
[QueryParam("locale")]
29+
public string? Locale { get; set; }
3030
}
3131
}
32-

0 commit comments

Comments
 (0)