Class PaginatedArrangementClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Arrangement collection resources.
public class PaginatedArrangementClient : PaginatedResourceClient<Arrangement, ArrangementResource, ArrangementCollectionResponse, ArrangementResponse>
- Inheritance
-
PaginatedResourceClient<Arrangement, ArrangementResource, ArrangementCollectionResponse, ArrangementResponse>PaginatedArrangementClient
- Inherited Members
Constructors
PaginatedArrangementClient(HttpClient, Uri)
Client for interacting with Arrangement collection resources.
public PaginatedArrangementClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Arrangement resources asynchronously.
public Task<ArrangementCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ArrangementCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Arrangement resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeKeys()
Include related Keys resources in the response.
public ArrangementClient IncludeKeys()
Returns
IncludeSections()
Include related Sections resources in the response.
public ArrangementClient IncludeSections()
Returns
PostAsync(Arrangement, CancellationToken)
Creates a new Arrangement resource asynchronously.
public Task<ArrangementResponse> PostAsync(Arrangement resource, CancellationToken cancellationToken = default)
Parameters
resourceArrangementThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ArrangementResponse>
A task representing the asynchronous operation, containing the created Arrangement resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<ArrangementResource>, CancellationToken)
Creates a new Arrangement resource asynchronously.
public Task<ArrangementResponse> PostAsync(JsonApiDocument<ArrangementResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<ArrangementResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ArrangementResponse>
A task representing the asynchronous operation, containing the created Arrangement resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WithId(string)
Creates a new instance of a Arrangement client for a specific resource ID.
public ArrangementClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- ArrangementClient
A new instance of the resource client for the specified resource ID.