Class NoteTemplateClient
- Namespace
- Crews.PlanningCenter.Api.Publishing.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the NoteTemplate resource.
public class NoteTemplateClient : SingletonResourceClient<NoteTemplate, NoteTemplateResource, NoteTemplateResponse>
- Inheritance
-
NoteTemplateClient
- Inherited Members
Constructors
NoteTemplateClient(HttpClient, Uri)
Client for interacting with the NoteTemplate resource.
public NoteTemplateClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public NoteTemplateClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- NoteTemplateClient
The current NoteTemplateClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public NoteTemplateClient ClearParameters()
Returns
- NoteTemplateClient
The current NoteTemplateClient instance.
GetAsync(CancellationToken)
Fetches the NoteTemplate resource asynchronously.
public Task<NoteTemplateResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NoteTemplateResponse>
A task representing the asynchronous operation, containing the NoteTemplate resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(NoteTemplate, CancellationToken)
Updates an existing NoteTemplate resource asynchronously.
public Task<NoteTemplateResponse> PatchAsync(NoteTemplate resource, CancellationToken cancellationToken = default)
Parameters
resourceNoteTemplateThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NoteTemplateResponse>
A task representing the asynchronous operation, containing the updated NoteTemplate resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<NoteTemplateResource>, CancellationToken)
Updates an existing NoteTemplate resource asynchronously.
public Task<NoteTemplateResponse> PatchAsync(JsonApiDocument<NoteTemplateResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<NoteTemplateResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NoteTemplateResponse>
A task representing the asynchronous operation, containing the updated NoteTemplate resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.