Class ArrangementClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Arrangement resource.
public class ArrangementClient : SingletonResourceClient<Arrangement, ArrangementResource, ArrangementResponse>
- Inheritance
-
ArrangementClient
- Inherited Members
Constructors
ArrangementClient(HttpClient, Uri)
Client for interacting with the Arrangement resource.
public ArrangementClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Attachments
Associated Attachments.
public PaginatedAttachmentClient Attachments { get; }
Property Value
Keys
Associated Keys.
public PaginatedKeyClient Keys { get; }
Property Value
Sections
Associated Sections.
public ArrangementSectionsClient Sections { get; }
Property Value
Tags
Associated Tags.
public PaginatedTagClient Tags { get; }
Property Value
Methods
AssignTagsAsync(CancellationToken)
Used to assign tags to an arrangement.
All tags will be replaced so the full data set must be sent.
It expects a body that looks like:
``json
{
"data": {
"type": "TagAssignment",
"attributes": {},
"relationships": {
"tags": {
"data": [
{
"type": "Tag",
"id": "5"
}
]
}
}
}
}<code><br /><br />On success you will get back a </code>204 No Content.
public Task AssignTagsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
DeleteAsync(CancellationToken)
Deletes the Arrangement 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 Arrangement resource asynchronously.
public Task<ArrangementResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ArrangementResponse>
A task representing the asynchronous operation, containing the Arrangement resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeKeys()
Include related Keys resources in the response.
public ArrangementClient IncludeKeys()
Returns
IncludeSections()
Include related Sections resources in the response.
public ArrangementClient IncludeSections()
Returns
PatchAsync(Arrangement, CancellationToken)
Updates an existing Arrangement resource asynchronously.
public Task<ArrangementResponse> PatchAsync(Arrangement resource, CancellationToken cancellationToken = default)
Parameters
resourceArrangementThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ArrangementResponse>
A task representing the asynchronous operation, containing the updated Arrangement resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<ArrangementResource>, CancellationToken)
Updates an existing Arrangement resource asynchronously.
public Task<ArrangementResponse> PatchAsync(JsonApiDocument<ArrangementResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<ArrangementResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ArrangementResponse>
A task representing the asynchronous operation, containing the updated Arrangement resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.