Class PlanTemplateClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the PlanTemplate resource.
public class PlanTemplateClient : SingletonResourceClient<PlanTemplate, PlanTemplateResource, PlanTemplateResponse>
- Inheritance
-
PlanTemplateClient
- Inherited Members
Constructors
PlanTemplateClient(HttpClient, Uri)
Client for interacting with the PlanTemplate resource.
public PlanTemplateClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Items
Associated Items.
public PaginatedItemClient Items { get; }
Property Value
Notes
Associated Notes.
public PaginatedPlanNoteClient Notes { get; }
Property Value
TeamMembers
Associated TeamMembers.
public PaginatedPlanPersonClient TeamMembers { get; }
Property Value
Methods
GetAsync(CancellationToken)
Fetches the PlanTemplate resource asynchronously.
public Task<PlanTemplateResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PlanTemplateResponse>
A task representing the asynchronous operation, containing the PlanTemplate resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
ItemReorderAsync(CancellationToken)
Reorder plan template items in one request.
This can be used to reorder all items in a plan template in one request.
It expects a POST body with a sequence of Item ids in order. E.G.
``json
{
"data": {
"type": "PlanItemReorder",
"attributes": {
"sequence": [
"5",
"1",
"3"
]
}
}
}<code><br /><br />On success you will get back a </code>204 No Content.
public Task ItemReorderAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken