public async Task <Catalog> GetCatalogAsync(CatalogParameters parameters, CancellationToken cancellationToken = new CancellationToken()) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } var queryParameters = new QueryString(); queryParameters.AddIfNotNull("n", parameters.Number); queryParameters.AddIfNotNull("last", parameters.Last); var response = await _client.MakeRequestAsync(cancellationToken, HttpMethod.Get, "v2/_catalog", queryParameters).ConfigureAwait(false); return(_client.JsonSerializer.DeserializeObject <Catalog>(response.Body)); }
public async Task <Catalog> GetCatalogAsync( CatalogParameters parameters = null, CancellationToken cancellationToken = default) { parameters = parameters ?? new CatalogParameters(); var queryParameters = new QueryString(); queryParameters.AddFromObjectWithQueryParameters(parameters); var response = await this._client.MakeRequestAsync( cancellationToken, HttpMethod.Get, "v2/_catalog", queryParameters).ConfigureAwait(false); return(this._client.JsonSerializer.DeserializeObject <Catalog>(response.Body)); }