Class PaginatedItemAssignmentClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_11_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with ItemAssignment collection resources.
public class PaginatedItemAssignmentClient : PaginatedResourceClient<ItemAssignment, ItemAssignmentResource, ItemAssignmentCollectionResponse, ItemAssignmentResponse>
- Inheritance
-
PaginatedResourceClient<ItemAssignment, ItemAssignmentResource, ItemAssignmentCollectionResponse, ItemAssignmentResponse>PaginatedItemAssignmentClient
- Inherited Members
Constructors
PaginatedItemAssignmentClient(HttpClient, Uri)
Client for interacting with ItemAssignment collection resources.
public PaginatedItemAssignmentClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedItemAssignmentClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedItemAssignmentClient
The current PaginatedItemAssignmentClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedItemAssignmentClient ClearParameters()
Returns
- PaginatedItemAssignmentClient
The current PaginatedItemAssignmentClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedItemAssignmentClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedItemAssignmentClient
The current PaginatedItemAssignmentClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
GetAsync(CancellationToken)
Fetches a paginated list of ItemAssignment resources asynchronously.
public Task<ItemAssignmentCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ItemAssignmentCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of ItemAssignment resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
Offset(int)
Sets the item offset in the paginated response.
public PaginatedItemAssignmentClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedItemAssignmentClient
The current PaginatedItemAssignmentClient instance.
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedItemAssignmentClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedItemAssignmentClient
The current PaginatedItemAssignmentClient instance.
PostAsync(ItemAssignment, CancellationToken)
Creates a new ItemAssignment resource asynchronously.
public Task<ItemAssignmentResponse> PostAsync(ItemAssignment resource, CancellationToken cancellationToken = default)
Parameters
resourceItemAssignmentThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ItemAssignmentResponse>
A task representing the asynchronous operation, containing the created ItemAssignment resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<ItemAssignmentResource>, CancellationToken)
Creates a new ItemAssignment resource asynchronously.
public Task<ItemAssignmentResponse> PostAsync(JsonApiDocument<ItemAssignmentResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<ItemAssignmentResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ItemAssignmentResponse>
A task representing the asynchronous operation, containing the created ItemAssignment resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WithId(string)
Creates a new instance of a ItemAssignment client for a specific resource ID.
public ItemAssignmentClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- ItemAssignmentClient
A new instance of the resource client for the specified resource ID.