fix null checks and duplicate EOL

This commit is contained in:
Jonas Dellinger 2024-02-10 13:52:30 +01:00
parent d5059820b6
commit dcec5467a8
3 changed files with 6 additions and 7 deletions

View File

@ -19,6 +19,7 @@ namespace SpotifyAPI.Web
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);
}
@ -48,6 +49,7 @@ namespace SpotifyAPI.Web
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);
}

View File

@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace SpotifyAPI.Web
{
public class ArtistRequest : RequestParams

View File

@ -15,8 +15,8 @@ namespace SpotifyAPI.Web
/// </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)".
@ -25,8 +25,7 @@ namespace SpotifyAPI.Web
/// 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; }
}
}