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