Table of Contents

Class PaginatedItemClient

Namespace
Crews.PlanningCenter.Api.Services.V2018_11_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with Item collection resources.

public class PaginatedItemClient : PaginatedResourceClient<Item, ItemResource, ItemCollectionResponse, ItemResponse>
Inheritance
PaginatedItemClient
Inherited Members

Constructors

PaginatedItemClient(HttpClient, Uri)

Client for interacting with Item collection resources.

public PaginatedItemClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of Item resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ItemCollectionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeArrangement()

Include related Arrangement resources in the response.

public ItemClient IncludeArrangement()

Returns

ItemClient

IncludeItemNotes()

Include related ItemNotes resources in the response.

public ItemClient IncludeItemNotes()

Returns

ItemClient

IncludeItemTimes()

Include related ItemTimes resources in the response.

public ItemClient IncludeItemTimes()

Returns

ItemClient

IncludeKey()

Include related Key resources in the response.

public ItemClient IncludeKey()

Returns

ItemClient

IncludeMedia()

Include related Media resources in the response.

public ItemClient IncludeMedia()

Returns

ItemClient

IncludeSelectedAttachment()

Include related SelectedAttachment resources in the response.

public ItemClient IncludeSelectedAttachment()

Returns

ItemClient

IncludeSong()

Include related Song resources in the response.

public ItemClient IncludeSong()

Returns

ItemClient

PostAsync(Item, CancellationToken)

Creates a new Item resource asynchronously.

public Task<ItemResponse> PostAsync(Item resource, CancellationToken cancellationToken = default)

Parameters

resource Item

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ItemResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<ItemResource>, CancellationToken)

Creates a new Item resource asynchronously.

public Task<ItemResponse> PostAsync(JsonApiDocument<ItemResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<ItemResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ItemResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WithId(string)

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

public ItemClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

ItemClient

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