Table of Contents

Class LabelClient

Namespace
Crews.PlanningCenter.Api.Giving.V2019_10_18
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with the Label resource.

public class LabelClient : SingletonResourceClient<Label, LabelResource, LabelResponse>
Inheritance
LabelClient
Inherited Members

Constructors

LabelClient(HttpClient, Uri)

Client for interacting with the Label resource.

public LabelClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public LabelClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

LabelClient

The current LabelClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public LabelClient ClearParameters()

Returns

LabelClient

The current LabelClient instance.

DeleteAsync(CancellationToken)

Deletes the Label 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 Label resource asynchronously.

public Task<LabelResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<LabelResponse>

A task representing the asynchronous operation, containing the Label resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(Label, CancellationToken)

Updates an existing Label resource asynchronously.

public Task<LabelResponse> PatchAsync(Label resource, CancellationToken cancellationToken = default)

Parameters

resource Label

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<LabelResponse>

A task representing the asynchronous operation, containing the updated Label resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<LabelResource>, CancellationToken)

Updates an existing Label resource asynchronously.

public Task<LabelResponse> PatchAsync(JsonApiDocument<LabelResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<LabelResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<LabelResponse>

A task representing the asynchronous operation, containing the updated Label resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.