Class PaginatedReportClient
- Namespace
- Crews.PlanningCenter.Api.People.V2022_01_28
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Report collection resources.
public class PaginatedReportClient : PaginatedResourceClient<Report, ReportResource, ReportCollectionResponse, ReportResponse>
- Inheritance
-
PaginatedReportClient
- Inherited Members
Constructors
PaginatedReportClient(HttpClient, Uri)
Client for interacting with Report collection resources.
public PaginatedReportClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedReportClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedReportClient
The current PaginatedReportClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedReportClient ClearParameters()
Returns
- PaginatedReportClient
The current PaginatedReportClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedReportClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedReportClient
The current PaginatedReportClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
GetAsync(CancellationToken)
Fetches a paginated list of Report resources asynchronously.
public Task<ReportCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ReportCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Report resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeCreatedBy()
Include related CreatedBy resources in the response.
public ReportClient IncludeCreatedBy()
Returns
IncludeUpdatedBy()
Include related UpdatedBy resources in the response.
public ReportClient IncludeUpdatedBy()
Returns
Offset(int)
Sets the item offset in the paginated response.
public PaginatedReportClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedReportClient
The current PaginatedReportClient instance.
OrderByBody()
Sort response items by the Body attribute.
public ReportClient OrderByBody()
Returns
OrderByBodyDescending()
Sort response items by the Body attribute. Use reverse order.
public ReportClient OrderByBodyDescending()
Returns
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public ReportClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public ReportClient OrderByCreatedAtDescending()
Returns
OrderByName()
Sort response items by the Name attribute.
public ReportClient OrderByName()
Returns
OrderByNameDescending()
Sort response items by the Name attribute. Use reverse order.
public ReportClient OrderByNameDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public ReportClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public ReportClient OrderByUpdatedAtDescending()
Returns
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedReportClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedReportClient
The current PaginatedReportClient instance.
PostAsync(Report, CancellationToken)
Creates a new Report resource asynchronously.
public Task<ReportResponse> PostAsync(Report resource, CancellationToken cancellationToken = default)
Parameters
resourceReportThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ReportResponse>
A task representing the asynchronous operation, containing the created Report resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<ReportResource>, CancellationToken)
Creates a new Report resource asynchronously.
public Task<ReportResponse> PostAsync(JsonApiDocument<ReportResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<ReportResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ReportResponse>
A task representing the asynchronous operation, containing the created Report resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereBody(string)
Query response items by the Body attribute.
public ReportClient WhereBody(string value)
Parameters
valuestring
Returns
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public ReportClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereName(string)
Query response items by the Name attribute.
public ReportClient WhereName(string value)
Parameters
valuestring
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public ReportClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a Report client for a specific resource ID.
public ReportClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- ReportClient
A new instance of the resource client for the specified resource ID.