Skip to content

Commit

Permalink
fix null checks and duplicate EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyCrazy committed Feb 10, 2024
1 parent d505982 commit dcec546
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions SpotifyAPI.Web/Clients/ArtistsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public Task<FullArtist> Get(string artistId, CancellationToken cancel = default)
public Task<FullArtist> Get(string artistId, ArtistRequest request, CancellationToken cancel = default)
{
Ensure.ArgumentNotNullOrEmptyString(artistId, nameof(artistId));
Ensure.ArgumentNotNull(request, nameof(request));

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

return API.Get<ArtistsRelatedArtistsResponse>(URLs.ArtistRelatedArtists(artistId), request.BuildQueryParams(), cancel);
}
Expand Down
2 changes: 0 additions & 2 deletions SpotifyAPI.Web/Models/Request/ArtistRequest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

namespace SpotifyAPI.Web
{
public class ArtistRequest : RequestParams
Expand Down
9 changes: 4 additions & 5 deletions SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public class PlaylistGetUsersRequest : RequestParams
/// </summary>
/// <value></value>
[QueryParam("offset")]
public int? Offset { get; set; }

public int? Offset { get; set; }

/// <summary>
/// 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)".
Expand All @@ -25,8 +25,7 @@ public class PlaylistGetUsersRequest : RequestParams
/// the category strings returned will be in the Spotify default language (American English).
/// </summary>
/// <value></value>
[QueryParam("locale")]
public string? Locale { get; set; }
[QueryParam("locale")]
public string? Locale { get; set; }
}
}

0 comments on commit dcec546

Please sign in to comment.