Class NoteClient
- Namespace
- Crews.PlanningCenter.Api.People.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Note resource.
public class NoteClient : SingletonResourceClient<Note, NoteResource, NoteResponse>
- Inheritance
-
NoteClient
- Inherited Members
Constructors
NoteClient(HttpClient, Uri)
Client for interacting with the Note resource.
public NoteClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Category
Associated Category.
public NoteCategoryClient Category { get; }
Property Value
CreatedBy
Associated CreatedBy.
public PersonClient CreatedBy { get; }
Property Value
Person
Associated Person.
public PersonClient Person { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Note 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 Note resource asynchronously.
public Task<NoteResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NoteResponse>
A task representing the asynchronous operation, containing the Note resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeCategory()
Include related Category resources in the response.
public NoteClient IncludeCategory()
Returns
IncludeCreatedBy()
Include related CreatedBy resources in the response.
public NoteClient IncludeCreatedBy()
Returns
IncludePerson()
Include related Person resources in the response.
public NoteClient IncludePerson()
Returns
PatchAsync(Note, CancellationToken)
Updates an existing Note resource asynchronously.
public Task<NoteResponse> PatchAsync(Note resource, CancellationToken cancellationToken = default)
Parameters
resourceNoteThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NoteResponse>
A task representing the asynchronous operation, containing the updated Note resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<NoteResource>, CancellationToken)
Updates an existing Note resource asynchronously.
public Task<NoteResponse> PatchAsync(JsonApiDocument<NoteResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<NoteResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<NoteResponse>
A task representing the asynchronous operation, containing the updated Note resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.