Spotify.NET/SpotifyAPI.Web/Clients/SearchClient.cs

20 lines
547 B
C#
Raw Normal View History

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);
}
}
}