mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 14:46:26 +00:00
b8a2190168
* feat: implements markets API * fix: use correct constructor name * feat: allow to pass a cancellation token * pass cancellation token * pass cancellation token only >NETSTANDARD2_1 Co-authored-by: Jonas Dellinger <jonas@dellinger.dev>
20 lines
547 B
C#
20 lines
547 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using SpotifyAPI.Web.Http;
|
|
using URLs = SpotifyAPI.Web.SpotifyUrls;
|
|
|
|
namespace SpotifyAPI.Web
|
|
{
|
|
public class SearchClient : APIClient, ISearchClient
|
|
{
|
|
public SearchClient(IAPIConnector apiConnector) : base(apiConnector) { }
|
|
|
|
public Task<SearchResponse> Item(SearchRequest request, CancellationToken cancel = default)
|
|
{
|
|
Ensure.ArgumentNotNull(request, nameof(request));
|
|
|
|
return API.Get<SearchResponse>(URLs.Search(), request.BuildQueryParams(), cancel);
|
|
}
|
|
}
|
|
}
|