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
httpClientHttpClienturiUri
Properties
Attachments
Associated Attachments.
public PaginatedAttachmentClient Attachments { get; }
Property Value
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public KeyClient AddCustomParameter(string parameter, string value)
Parameters
Returns
ClearParameters()
Removes the entire query string from the request URI.
public KeyClient ClearParameters()
Returns
DeleteAsync(CancellationToken)
Deletes the Key resource asynchronously.
public Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
cancellationTokenCancellationTokenA 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
resourceKeyThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<KeyResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.