/// <inheritdoc /> public Task <IPagedList <ClientGrant> > GetAllAsync(GetClientGrantsRequest request) { if (request == null) { throw new ArgumentNullException(nameof(request)); } return(Connection.GetAsync <IPagedList <ClientGrant> >("client-grants", null, new Dictionary <string, string> { { "audience", request.Audience }, { "client_id", request.ClientId } }, null, new PagedListConverter <ClientGrant>("client_grants"))); }
/// <summary> /// Gets a list of all the client grants. /// </summary> /// <param name="request">Specifies criteria to use when querying client grants.</param> /// <param name="pagination">Specifies <see cref="PaginationInfo"/> to use in requesting paged results.</param> /// <returns>A <see cref="IPagedList{ClientGrant}"/> containing the client grants requested.</returns> public Task <IPagedList <ClientGrant> > GetAllAsync(GetClientGrantsRequest request, PaginationInfo pagination) { if (request == null) { throw new ArgumentNullException(nameof(request)); } if (pagination == null) { throw new ArgumentNullException(nameof(pagination)); } return(Connection.GetAsync <IPagedList <ClientGrant> >(BuildUri("client-grants", new Dictionary <string, string> { { "audience", request.Audience }, { "client_id", request.ClientId }, { "page", pagination.PageNo.ToString() }, { "per_page", pagination.PerPage.ToString() }, { "include_totals", pagination.IncludeTotals.ToString().ToLower() } }), DefaultHeaders, converters)); }
public static IAsyncEnumerable <ClientGrant> GetAllAsync(this ClientGrantsClient client, GetClientGrantsRequest request, IReporter reporter = null) { return(GetAllAsyncInternal(page => client.GetAllAsync(request, page), "client grants", reporter)); }