using System; using System.Net; using System.Net.Http; using System.Threading.Tasks; namespace Sony.Filtr.AppleMusicAPI { public class AppleMusicApi { private readonly HttpClient _client; public async Task GetCharts() { } private HttpClient GetDefaultClient() { var baseHandler = new HttpClientHandler() { UseCookies = false, AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip }; var authHandler = new AppleMusicAuthClientCredentialsHttpMessageHandler(_clientId, _clientSecret, baseHandler); //var rateLimitHandler = new RateLimitedHttpMessageHandler(authHandler, new SpotifyRateLimiter()); HttpClient client = new HttpClient(); client.BaseAddress = new Uri(BaseUrl); return client; } } }