Table of Contents

Class PlanClient

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

Client for interacting with the Plan resource.

public class PlanClient : SingletonResourceClient<Plan, PlanResource, PlanResponse>
Inheritance
PlanClient
Inherited Members

Constructors

PlanClient(HttpClient, Uri)

Client for interacting with the Plan resource.

public PlanClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

AllAttachments

Associated AllAttachments.

public PaginatedAttachmentClient AllAttachments { get; }

Property Value

PaginatedAttachmentClient

Attachments

Associated Attachments.

public PaginatedAttachmentClient Attachments { get; }

Property Value

PaginatedAttachmentClient

Attendances

Associated Attendances.

public PaginatedAttendanceClient Attendances { get; }

Property Value

PaginatedAttendanceClient

Contributors

Associated Contributors.

public PaginatedContributorClient Contributors { get; }

Property Value

PaginatedContributorClient

Items

Associated Items.

public PaginatedItemClient Items { get; }

Property Value

PaginatedItemClient

Live

Associated Live.

public LiveClient Live { get; }

Property Value

LiveClient

MySchedules

Associated MySchedules.

public PaginatedScheduleClient MySchedules { get; }

Property Value

PaginatedScheduleClient

NeededPositions

Associated NeededPositions.

public PaginatedNeededPositionClient NeededPositions { get; }

Property Value

PaginatedNeededPositionClient

NextPlan

Associated NextPlan.

public PlanClient NextPlan { get; }

Property Value

PlanClient

Notes

Associated Notes.

public PaginatedPlanNoteClient Notes { get; }

Property Value

PaginatedPlanNoteClient

PlanTimes

Associated PlanTimes.

public PaginatedPlanTimeClient PlanTimes { get; }

Property Value

PaginatedPlanTimeClient

PreviousPlan

Associated PreviousPlan.

public PlanClient PreviousPlan { get; }

Property Value

PlanClient

Series

Associated Series.

public SeriesClient Series { get; }

Property Value

SeriesClient

SignupTeams

Associated SignupTeams.

public PaginatedTeamClient SignupTeams { get; }

Property Value

PaginatedTeamClient

TeamMembers

Associated TeamMembers.

public PaginatedPlanPersonClient TeamMembers { get; }

Property Value

PaginatedPlanPersonClient

Methods

AutoscheduleAsync(CancellationToken)

Auto-schedule for a team. Returns a collection of scheduled PlanPersonAutoscheduleVertex
Auto-schedule for a team. Returns a collection of scheduled PlanPersonAutoscheduleVertex.

It expects a POST body with a Team relationship.
<code>json<br />{<br /> "data": {<br /> "type": "Autoschedule",<br /> "attributes": {},<br /> "relationship": {<br /> "team": {<br /> "data": {<br /> "id": 1,<br /> "type": 'Team'<br /> }<br /> }<br /> }<br /> }<br />}<br /></code>

public Task AutoscheduleAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

DeleteAsync(CancellationToken)

Deletes the Plan 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 Plan resource asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PlanResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

ImportTemplateAsync(CancellationToken)

Import template to plan
This action allows the importing of a template into a plan.

Accepted attributes:
- plan_id (Integer) ID of template to copying from

- copy_items (Boolean) Copy Items from another plan. (default false)

- copy_people (Boolean) Copy People from another plan. (default false)

- copy_notes (Boolean) Copy Notes from another plan. (default false)

[Obsolete("This action is deprecated and may be removed in a future release.")]
public Task ImportTemplateAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

IncludeContributors()

Include related Contributors resources in the response.

public PlanClient IncludeContributors()

Returns

PlanClient

IncludeMySchedules()

Include related MySchedules resources in the response.

public PlanClient IncludeMySchedules()

Returns

PlanClient

IncludePlanTimes()

Include related PlanTimes resources in the response.

public PlanClient IncludePlanTimes()

Returns

PlanClient

IncludeSeries()

Include related Series resources in the response.

public PlanClient IncludeSeries()

Returns

PlanClient

ItemReorderAsync(CancellationToken)

Reorder plan items in one request.
This can be used to reorder all items in a plan 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

cancellationToken CancellationToken

Returns

Task

PatchAsync(Plan, CancellationToken)

Updates an existing Plan resource asynchronously.

public Task<PlanResponse> PatchAsync(Plan resource, CancellationToken cancellationToken = default)

Parameters

resource Plan

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PlanResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<PlanResource>, CancellationToken)

Updates an existing Plan resource asynchronously.

public Task<PlanResponse> PatchAsync(JsonApiDocument<PlanResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<PlanResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PlanResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.