Table of Contents

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

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedReportClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

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

filter string

The 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

cancellationToken CancellationToken

A 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

ReportClient

IncludeUpdatedBy()

Include related UpdatedBy resources in the response.

public ReportClient IncludeUpdatedBy()

Returns

ReportClient

Offset(int)

Sets the item offset in the paginated response.

public PaginatedReportClient Offset(int count)

Parameters

count int

The number of items to skip.

Returns

PaginatedReportClient

The current PaginatedReportClient instance.

OrderByBody()

Sort response items by the Body attribute.

public ReportClient OrderByBody()

Returns

ReportClient

OrderByBodyDescending()

Sort response items by the Body attribute. Use reverse order.

public ReportClient OrderByBodyDescending()

Returns

ReportClient

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public ReportClient OrderByCreatedAt()

Returns

ReportClient

OrderByCreatedAtDescending()

Sort response items by the CreatedAt attribute. Use reverse order.

public ReportClient OrderByCreatedAtDescending()

Returns

ReportClient

OrderByName()

Sort response items by the Name attribute.

public ReportClient OrderByName()

Returns

ReportClient

OrderByNameDescending()

Sort response items by the Name attribute. Use reverse order.

public ReportClient OrderByNameDescending()

Returns

ReportClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public ReportClient OrderByUpdatedAt()

Returns

ReportClient

OrderByUpdatedAtDescending()

Sort response items by the UpdatedAt attribute. Use reverse order.

public ReportClient OrderByUpdatedAtDescending()

Returns

ReportClient

PerPage(int)

Sets the number of items to be returned per page in the paginated response.

public PaginatedReportClient PerPage(int count)

Parameters

count int

The 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

resource Report

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<ReportResource>

The JSON:API document to be sent in the POST request.

cancellationToken CancellationToken

A 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

value string

Returns

ReportClient

WhereCreatedAt(DateTime)

Query response items by the CreatedAt attribute.

public ReportClient WhereCreatedAt(DateTime value)

Parameters

value DateTime

Returns

ReportClient

WhereName(string)

Query response items by the Name attribute.

public ReportClient WhereName(string value)

Parameters

value string

Returns

ReportClient

WhereUpdatedAt(DateTime)

Query response items by the UpdatedAt attribute.

public ReportClient WhereUpdatedAt(DateTime value)

Parameters

value DateTime

Returns

ReportClient

WithId(string)

Creates a new instance of a Report client for a specific resource ID.

public ReportClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

ReportClient

A new instance of the resource client for the specified resource ID.