Class PaginatedArrangementClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_11_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
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedArrangementClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedArrangementClient
The current PaginatedArrangementClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedArrangementClient ClearParameters()
Returns
- PaginatedArrangementClient
The current PaginatedArrangementClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedArrangementClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedArrangementClient
The current PaginatedArrangementClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
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
Offset(int)
Sets the item offset in the paginated response.
public PaginatedArrangementClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedArrangementClient
The current PaginatedArrangementClient instance.
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedArrangementClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedArrangementClient
The current PaginatedArrangementClient instance.
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.