Table of Contents

Class PaginatedWebhookSubscriptionClient

Namespace
Crews.PlanningCenter.Api.Webhooks.V2022_10_20
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with WebhookSubscription collection resources.

public class PaginatedWebhookSubscriptionClient : PaginatedResourceClient<WebhookSubscription, WebhookSubscriptionResource, WebhookSubscriptionCollectionResponse, WebhookSubscriptionResponse>
Inheritance
PaginatedWebhookSubscriptionClient
Inherited Members

Constructors

PaginatedWebhookSubscriptionClient(HttpClient, Uri)

Client for interacting with WebhookSubscription collection resources.

public PaginatedWebhookSubscriptionClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of WebhookSubscription resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<WebhookSubscriptionCollectionResponse>

A task representing the asynchronous operation, containing a paginated list of WebhookSubscription resources.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(WebhookSubscription, CancellationToken)

Creates a new WebhookSubscription resource asynchronously.

public Task<WebhookSubscriptionResponse> PostAsync(WebhookSubscription resource, CancellationToken cancellationToken = default)

Parameters

resource WebhookSubscription

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<WebhookSubscriptionResponse>

A task representing the asynchronous operation, containing the created WebhookSubscription resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<WebhookSubscriptionResource>, CancellationToken)

Creates a new WebhookSubscription resource asynchronously.

public Task<WebhookSubscriptionResponse> PostAsync(JsonApiDocument<WebhookSubscriptionResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<WebhookSubscriptionResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<WebhookSubscriptionResponse>

A task representing the asynchronous operation, containing the created WebhookSubscription resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereApplicationId(string)

Query response items by the ApplicationId attribute.

public WebhookSubscriptionClient WhereApplicationId(string value)

Parameters

value string

Returns

WebhookSubscriptionClient

WithId(string)

Creates a new instance of a WebhookSubscription client for a specific resource ID.

public WebhookSubscriptionClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

WebhookSubscriptionClient

A new instance of the resource client for the specified resource ID.