Class BlockoutClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Blockout resource.
public class BlockoutClient : SingletonResourceClient<Blockout, BlockoutResource, BlockoutResponse>
- Inheritance
-
BlockoutClient
- Inherited Members
Constructors
BlockoutClient(HttpClient, Uri)
Client for interacting with the Blockout resource.
public BlockoutClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
BlockoutDates
Associated BlockoutDates.
public PaginatedBlockoutDateClient BlockoutDates { get; }
Property Value
BlockoutExceptions
Associated BlockoutExceptions.
public PaginatedBlockoutExceptionClient BlockoutExceptions { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Blockout 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 Blockout resource asynchronously.
public Task<BlockoutResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<BlockoutResponse>
A task representing the asynchronous operation, containing the Blockout resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(Blockout, CancellationToken)
Updates an existing Blockout resource asynchronously.
public Task<BlockoutResponse> PatchAsync(Blockout resource, CancellationToken cancellationToken = default)
Parameters
resourceBlockoutThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<BlockoutResponse>
A task representing the asynchronous operation, containing the updated Blockout resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<BlockoutResource>, CancellationToken)
Updates an existing Blockout resource asynchronously.
public Task<BlockoutResponse> PatchAsync(JsonApiDocument<BlockoutResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<BlockoutResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<BlockoutResponse>
A task representing the asynchronous operation, containing the updated Blockout resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.