Table of Contents

Class KeyClient

Namespace
Crews.PlanningCenter.Api.Services.V2018_11_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with the Key resource.

public class KeyClient : SingletonResourceClient<Key, KeyResource, KeyResponse>
Inheritance
KeyClient
Inherited Members

Constructors

KeyClient(HttpClient, Uri)

Client for interacting with the Key resource.

public KeyClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Attachments

Associated Attachments.

public PaginatedAttachmentClient Attachments { get; }

Property Value

PaginatedAttachmentClient

Methods

DeleteAsync(CancellationToken)

Deletes the Key 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 Key resource asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<KeyResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(Key, CancellationToken)

Updates an existing Key resource asynchronously.

public Task<KeyResponse> PatchAsync(Key resource, CancellationToken cancellationToken = default)

Parameters

resource Key

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<KeyResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<KeyResource>, CancellationToken)

Updates an existing Key resource asynchronously.

public Task<KeyResponse> PatchAsync(JsonApiDocument<KeyResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<KeyResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<KeyResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.