public static NewsArticlesRequest WithPageToken( this NewsArticlesRequest request, String pageToken) { request.EnsureNotNull(nameof(request)).Pagination.Token = pageToken; return(request); }
public async Task <IPage <INewsArticle> > ListNewsArticlesAsync( NewsArticlesRequest request, CancellationToken cancellationToken = default) => await _httpClient.GetAsync <IPage <INewsArticle>, JsonNewsPage>( await request.EnsureNotNull(nameof(request)).Validate() .GetUriBuilderAsync(_httpClient).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
public static NewsArticlesRequest WithPageSize( this NewsArticlesRequest request, UInt32 pageSize) { request.EnsureNotNull(nameof(request)).Pagination.Size = pageSize; return(request); }