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
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
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.