Table of Contents

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

httpClient HttpClient
uri Uri

Properties

BlockoutDates

Associated BlockoutDates.

public PaginatedBlockoutDateClient BlockoutDates { get; }

Property Value

PaginatedBlockoutDateClient

BlockoutExceptions

Associated BlockoutExceptions.

public PaginatedBlockoutExceptionClient BlockoutExceptions { get; }

Property Value

PaginatedBlockoutExceptionClient

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public BlockoutClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

BlockoutClient

The current BlockoutClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public BlockoutClient ClearParameters()

Returns

BlockoutClient

The current BlockoutClient instance.

DeleteAsync(CancellationToken)

Deletes the Blockout resource asynchronously.

public Task DeleteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A 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

cancellationToken CancellationToken

A 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

resource Blockout

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<BlockoutResource>

The JSON:API document to be sent in the patch request.

cancellationToken CancellationToken

A 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.