Class NeededPositionClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_11_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
httpClientHttpClienturiUri
Properties
Team
Associated Team.
public TeamClient Team { get; }
Property Value
Time
Associated Time.
public PlanTimeClient Time { get; }
Property Value
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public NeededPositionClient AddCustomParameter(string parameter, string value)
Parameters
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
cancellationTokenCancellationTokenA 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
cancellationTokenCancellationTokenA 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
IncludeTime()
Include related Time resources in the response.
public NeededPositionClient IncludeTime()
Returns
PatchAsync(NeededPosition, CancellationToken)
Updates an existing NeededPosition resource asynchronously.
public Task<NeededPositionResponse> PatchAsync(NeededPosition resource, CancellationToken cancellationToken = default)
Parameters
resourceNeededPositionThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<NeededPositionResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA 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.