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
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedPlanClient AddCustomParameter(string parameter, string value)
Parameters
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
filterstringThe 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
cancellationTokenCancellationTokenA 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
IncludeMySchedules()
Include related MySchedules resources in the response.
public PlanClient IncludeMySchedules()
Returns
IncludePlanTimes()
Include related PlanTimes resources in the response.
public PlanClient IncludePlanTimes()
Returns
IncludeSeries()
Include related Series resources in the response.
public PlanClient IncludeSeries()
Returns
Offset(int)
Sets the item offset in the paginated response.
public PaginatedPlanClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedPlanClient
The current PaginatedPlanClient instance.
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public PlanClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public PlanClient OrderByCreatedAtDescending()
Returns
OrderBySortDate()
Sort response items by the SortDate attribute.
public PlanClient OrderBySortDate()
Returns
OrderBySortDateDescending()
Sort response items by the SortDate attribute. Use reverse order.
public PlanClient OrderBySortDateDescending()
Returns
OrderByTitle()
Sort response items by the Title attribute.
public PlanClient OrderByTitle()
Returns
OrderByTitleDescending()
Sort response items by the Title attribute. Use reverse order.
public PlanClient OrderByTitleDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public PlanClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public PlanClient OrderByUpdatedAtDescending()
Returns
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedPlanClient PerPage(int count)
Parameters
countintThe 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
resourcePlanThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<PlanResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA 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
valueDateTime
Returns
WhereId(string)
Query response items by the Id attribute.
public PlanClient WhereId(string value)
Parameters
valuestring
Returns
WhereSeriesTitle(string)
Query response items by the SeriesTitle attribute.
public PlanClient WhereSeriesTitle(string value)
Parameters
valuestring
Returns
WhereTitle(string)
Query response items by the Title attribute.
public PlanClient WhereTitle(string value)
Parameters
valuestring
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public PlanClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a Plan client for a specific resource ID.
public PlanClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- PlanClient
A new instance of the resource client for the specified resource ID.