Table of Contents

Class PaginatedPlanClient

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

Client for interacting with Plan collection resources.

public class PaginatedPlanClient : PaginatedResourceClient<Plan, PlanResource, PlanCollectionResponse, PlanResponse>
Inheritance
PaginatedPlanClient
Inherited Members

Constructors

PaginatedPlanClient(HttpClient, Uri)

Client for interacting with Plan collection resources.

public PaginatedPlanClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedPlanClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

PaginatedPlanClient

The current PaginatedPlanClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public PaginatedPlanClient ClearParameters()

Returns

PaginatedPlanClient

The current PaginatedPlanClient instance.

Filter(string)

Adds a filter query parameter to the request.

public PaginatedPlanClient Filter(string filter)

Parameters

filter string

The filter criteria.

Returns

PaginatedPlanClient

The current PaginatedPlanClient instance.

Remarks

See Planning Center API documentation for details on supported filter values for this resource.

GetAsync(CancellationToken)

Fetches a paginated list of Plan resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PlanCollectionResponse>

A task representing the asynchronous operation, containing a paginated list of Plan resources.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

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

Offset(int)

Sets the item offset in the paginated response.

public PaginatedPlanClient Offset(int count)

Parameters

count int

The number of items to skip.

Returns

PaginatedPlanClient

The current PaginatedPlanClient instance.

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public PlanClient OrderByCreatedAt()

Returns

PlanClient

OrderByCreatedAtDescending()

Sort response items by the CreatedAt attribute. Use reverse order.

public PlanClient OrderByCreatedAtDescending()

Returns

PlanClient

OrderBySortDate()

Sort response items by the SortDate attribute.

public PlanClient OrderBySortDate()

Returns

PlanClient

OrderBySortDateDescending()

Sort response items by the SortDate attribute. Use reverse order.

public PlanClient OrderBySortDateDescending()

Returns

PlanClient

OrderByTitle()

Sort response items by the Title attribute.

public PlanClient OrderByTitle()

Returns

PlanClient

OrderByTitleDescending()

Sort response items by the Title attribute. Use reverse order.

public PlanClient OrderByTitleDescending()

Returns

PlanClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public PlanClient OrderByUpdatedAt()

Returns

PlanClient

OrderByUpdatedAtDescending()

Sort response items by the UpdatedAt attribute. Use reverse order.

public PlanClient OrderByUpdatedAtDescending()

Returns

PlanClient

PerPage(int)

Sets the number of items to be returned per page in the paginated response.

public PaginatedPlanClient PerPage(int count)

Parameters

count int

The number of items to be returned per page.

Returns

PaginatedPlanClient

The current PaginatedPlanClient instance.

PostAsync(Plan, CancellationToken)

Creates a new Plan resource asynchronously.

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

Parameters

resource Plan

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PlanResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<PlanResource>, CancellationToken)

Creates a new Plan resource asynchronously.

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

Parameters

document JsonApiDocument<PlanResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PlanResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereCreatedAt(DateTime)

Query response items by the CreatedAt attribute.

public PlanClient WhereCreatedAt(DateTime value)

Parameters

value DateTime

Returns

PlanClient

WhereId(string)

Query response items by the Id attribute.

public PlanClient WhereId(string value)

Parameters

value string

Returns

PlanClient

WhereSeriesTitle(string)

Query response items by the SeriesTitle attribute.

public PlanClient WhereSeriesTitle(string value)

Parameters

value string

Returns

PlanClient

WhereTitle(string)

Query response items by the Title attribute.

public PlanClient WhereTitle(string value)

Parameters

value string

Returns

PlanClient

WhereUpdatedAt(DateTime)

Query response items by the UpdatedAt attribute.

public PlanClient WhereUpdatedAt(DateTime value)

Parameters

value DateTime

Returns

PlanClient

WithId(string)

Creates a new instance of a Plan client for a specific resource ID.

public PlanClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

PlanClient

A new instance of the resource client for the specified resource ID.