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
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Item resources asynchronously.
public Task<ItemCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
IncludeItemNotes()
Include related ItemNotes resources in the response.
public ItemClient IncludeItemNotes()
Returns
IncludeItemTimes()
Include related ItemTimes resources in the response.
public ItemClient IncludeItemTimes()
Returns
IncludeKey()
Include related Key resources in the response.
public ItemClient IncludeKey()
Returns
IncludeMedia()
Include related Media resources in the response.
public ItemClient IncludeMedia()
Returns
IncludeSelectedAttachment()
Include related SelectedAttachment resources in the response.
public ItemClient IncludeSelectedAttachment()
Returns
IncludeSong()
Include related Song resources in the response.
public ItemClient IncludeSong()
Returns
PostAsync(Item, CancellationToken)
Creates a new Item resource asynchronously.
public Task<ItemResponse> PostAsync(Item resource, CancellationToken cancellationToken = default)
Parameters
resourceItemThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<ItemResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA 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
idstringThe ID of the resource to create a client for.
Returns
- ItemClient
A new instance of the resource client for the specified resource ID.