Table of Contents

Class ReportTemplateClient

Namespace
Crews.PlanningCenter.Api.Calendar.V2021_07_20
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with the ReportTemplate resource.

public class ReportTemplateClient : SingletonResourceClient<ReportTemplate, ReportTemplateResource, ReportTemplateResponse>
Inheritance
ReportTemplateClient
Inherited Members

Constructors

ReportTemplateClient(HttpClient, Uri)

Client for interacting with the ReportTemplate resource.

public ReportTemplateClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public ReportTemplateClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

ReportTemplateClient

The current ReportTemplateClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public ReportTemplateClient ClearParameters()

Returns

ReportTemplateClient

The current ReportTemplateClient instance.

DeleteAsync(CancellationToken)

Deletes the ReportTemplate resource asynchronously.

public Task DeleteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task

A task representing the asynchronous delete operation.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

GetAsync(CancellationToken)

Fetches the ReportTemplate resource asynchronously.

public Task<ReportTemplateResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ReportTemplateResponse>

A task representing the asynchronous operation, containing the ReportTemplate resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(ReportTemplate, CancellationToken)

Updates an existing ReportTemplate resource asynchronously.

public Task<ReportTemplateResponse> PatchAsync(ReportTemplate resource, CancellationToken cancellationToken = default)

Parameters

resource ReportTemplate

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ReportTemplateResponse>

A task representing the asynchronous operation, containing the updated ReportTemplate resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<ReportTemplateResource>, CancellationToken)

Updates an existing ReportTemplate resource asynchronously.

public Task<ReportTemplateResponse> PatchAsync(JsonApiDocument<ReportTemplateResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<ReportTemplateResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ReportTemplateResponse>

A task representing the asynchronous operation, containing the updated ReportTemplate resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.