Class PaginatedPlanTemplateClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_11_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with PlanTemplate collection resources.
public class PaginatedPlanTemplateClient : PaginatedResourceClient<PlanTemplate, PlanTemplateResource, PlanTemplateCollectionResponse, PlanTemplateResponse>
- Inheritance
-
PaginatedResourceClient<PlanTemplate, PlanTemplateResource, PlanTemplateCollectionResponse, PlanTemplateResponse>PaginatedPlanTemplateClient
- Inherited Members
Constructors
PaginatedPlanTemplateClient(HttpClient, Uri)
Client for interacting with PlanTemplate collection resources.
public PaginatedPlanTemplateClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedPlanTemplateClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedPlanTemplateClient
The current PaginatedPlanTemplateClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedPlanTemplateClient ClearParameters()
Returns
- PaginatedPlanTemplateClient
The current PaginatedPlanTemplateClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedPlanTemplateClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedPlanTemplateClient
The current PaginatedPlanTemplateClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
GetAsync(CancellationToken)
Fetches a paginated list of PlanTemplate resources asynchronously.
public Task<PlanTemplateCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PlanTemplateCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of PlanTemplate resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
Offset(int)
Sets the item offset in the paginated response.
public PaginatedPlanTemplateClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedPlanTemplateClient
The current PaginatedPlanTemplateClient instance.
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public PlanTemplateClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public PlanTemplateClient OrderByCreatedAtDescending()
Returns
OrderByItemCount()
Sort response items by the ItemCount attribute.
public PlanTemplateClient OrderByItemCount()
Returns
OrderByItemCountDescending()
Sort response items by the ItemCount attribute. Use reverse order.
public PlanTemplateClient OrderByItemCountDescending()
Returns
OrderByName()
Sort response items by the Name attribute.
public PlanTemplateClient OrderByName()
Returns
OrderByNameDescending()
Sort response items by the Name attribute. Use reverse order.
public PlanTemplateClient OrderByNameDescending()
Returns
OrderByNoteCount()
Sort response items by the NoteCount attribute.
public PlanTemplateClient OrderByNoteCount()
Returns
OrderByNoteCountDescending()
Sort response items by the NoteCount attribute. Use reverse order.
public PlanTemplateClient OrderByNoteCountDescending()
Returns
OrderByTeamCount()
Sort response items by the TeamCount attribute.
public PlanTemplateClient OrderByTeamCount()
Returns
OrderByTeamCountDescending()
Sort response items by the TeamCount attribute. Use reverse order.
public PlanTemplateClient OrderByTeamCountDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public PlanTemplateClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public PlanTemplateClient OrderByUpdatedAtDescending()
Returns
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedPlanTemplateClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedPlanTemplateClient
The current PaginatedPlanTemplateClient instance.
WithId(string)
Creates a new instance of a PlanTemplate client for a specific resource ID.
public PlanTemplateClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- PlanTemplateClient
A new instance of the resource client for the specified resource ID.