2022-11-18 11:30:09 +00:00
|
|
|
using System.Threading;
|
2020-05-03 21:34:03 +01:00
|
|
|
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) { }
|
|
|
|
|
2022-11-18 11:30:09 +00:00
|
|
|
public Task<SearchResponse> Item(SearchRequest request, CancellationToken cancel = default)
|
2020-05-03 21:34:03 +01:00
|
|
|
{
|
|
|
|
Ensure.ArgumentNotNull(request, nameof(request));
|
|
|
|
|
2022-11-18 11:30:09 +00:00
|
|
|
return API.Get<SearchResponse>(URLs.Search(), request.BuildQueryParams(), cancel);
|
2020-05-03 21:34:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|