Table of Contents

Class NeededPositionClient

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

Client for interacting with the NeededPosition resource.

public class NeededPositionClient : SingletonResourceClient<NeededPosition, NeededPositionResource, NeededPositionResponse>
Inheritance
NeededPositionClient
Inherited Members

Constructors

NeededPositionClient(HttpClient, Uri)

Client for interacting with the NeededPosition resource.

public NeededPositionClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Team

Associated Team.

public TeamClient Team { get; }

Property Value

TeamClient

Time

Associated Time.

public PlanTimeClient Time { get; }

Property Value

PlanTimeClient

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public NeededPositionClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

NeededPositionClient

The current NeededPositionClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public NeededPositionClient ClearParameters()

Returns

NeededPositionClient

The current NeededPositionClient instance.

DeleteAsync(CancellationToken)

Deletes the NeededPosition resource asynchronously.

public Task DeleteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task

A task representing the asynchronous delete operation.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

GetAsync(CancellationToken)

Fetches the NeededPosition resource asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<NeededPositionResponse>

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

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

PatchAsync(NeededPosition, CancellationToken)

Updates an existing NeededPosition resource asynchronously.

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

Parameters

resource NeededPosition

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<NeededPositionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<NeededPositionResource>, CancellationToken)

Updates an existing NeededPosition resource asynchronously.

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

Parameters

document JsonApiDocument<NeededPositionResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<NeededPositionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.