Class TagClient
- Namespace
- Crews.PlanningCenter.Api.Calendar.V2021_07_20
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Tag resource.
public class TagClient : SingletonResourceClient<Tag, TagResource, TagResponse>
- Inheritance
-
TagClient
- Inherited Members
Constructors
TagClient(HttpClient, Uri)
Client for interacting with the Tag resource.
public TagClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
EventInstances
Associated EventInstances.
public PaginatedEventInstanceClient EventInstances { get; }
Property Value
Events
Associated Events.
public PaginatedEventClient Events { get; }
Property Value
TagGroup
Associated TagGroup.
public TagGroupClient TagGroup { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Tag 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 Tag resource asynchronously.
public Task<TagResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<TagResponse>
A task representing the asynchronous operation, containing the Tag resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeTagGroup()
Include related TagGroup resources in the response.
public TagClient IncludeTagGroup()
Returns
PatchAsync(Tag, CancellationToken)
Updates an existing Tag resource asynchronously.
public Task<TagResponse> PatchAsync(Tag resource, CancellationToken cancellationToken = default)
Parameters
resourceTagThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<TagResponse>
A task representing the asynchronous operation, containing the updated Tag resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<TagResource>, CancellationToken)
Updates an existing Tag resource asynchronously.
public Task<TagResponse> PatchAsync(JsonApiDocument<TagResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<TagResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<TagResponse>
A task representing the asynchronous operation, containing the updated Tag resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.