Table of Contents

Class PaginatedNeededPositionClient

Namespace
Crews.PlanningCenter.Api.Services.V2018_11_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with NeededPosition collection resources.

public class PaginatedNeededPositionClient : PaginatedResourceClient<NeededPosition, NeededPositionResource, NeededPositionCollectionResponse, NeededPositionResponse>
Inheritance
PaginatedNeededPositionClient
Inherited Members

Constructors

PaginatedNeededPositionClient(HttpClient, Uri)

Client for interacting with NeededPosition collection resources.

public PaginatedNeededPositionClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of NeededPosition resources asynchronously.

public Task<NeededPositionCollectionResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<NeededPositionCollectionResponse>

A task representing the asynchronous operation, containing a paginated list of NeededPosition resources.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeTeam()

Include related Team resources in the response.

public NeededPositionClient IncludeTeam()

Returns

NeededPositionClient

IncludeTime()

Include related Time resources in the response.

public NeededPositionClient IncludeTime()

Returns

NeededPositionClient

PostAsync(NeededPosition, CancellationToken)

Creates a new NeededPosition resource asynchronously.

public Task<NeededPositionResponse> PostAsync(NeededPosition resource, CancellationToken cancellationToken = default)

Parameters

resource NeededPosition

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<NeededPositionResponse>

A task representing the asynchronous operation, containing the created NeededPosition resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<NeededPositionResource>, CancellationToken)

Creates a new NeededPosition resource asynchronously.

public Task<NeededPositionResponse> PostAsync(JsonApiDocument<NeededPositionResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<NeededPositionResource>

The JSON:API document to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<NeededPositionResponse>

A task representing the asynchronous operation, containing the created NeededPosition resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WithId(string)

Creates a new instance of a NeededPosition client for a specific resource ID.

public NeededPositionClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

NeededPositionClient

A new instance of the resource client for the specified resource ID.