Class PaginatedPlanNoteClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_11_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with PlanNote collection resources.
public class PaginatedPlanNoteClient : PaginatedResourceClient<PlanNote, PlanNoteResource, PlanNoteCollectionResponse, PlanNoteResponse>
- Inheritance
-
PaginatedPlanNoteClient
- Inherited Members
Constructors
PaginatedPlanNoteClient(HttpClient, Uri)
Client for interacting with PlanNote collection resources.
public PaginatedPlanNoteClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedPlanNoteClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedPlanNoteClient
The current PaginatedPlanNoteClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedPlanNoteClient ClearParameters()
Returns
- PaginatedPlanNoteClient
The current PaginatedPlanNoteClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedPlanNoteClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedPlanNoteClient
The current PaginatedPlanNoteClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
GetAsync(CancellationToken)
Fetches a paginated list of PlanNote resources asynchronously.
public Task<PlanNoteCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PlanNoteCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of PlanNote resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludePlanNoteCategory()
Include related PlanNoteCategory resources in the response.
public PlanNoteClient IncludePlanNoteCategory()
Returns
Offset(int)
Sets the item offset in the paginated response.
public PaginatedPlanNoteClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedPlanNoteClient
The current PaginatedPlanNoteClient instance.
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public PlanNoteClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public PlanNoteClient OrderByCreatedAtDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public PlanNoteClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public PlanNoteClient OrderByUpdatedAtDescending()
Returns
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedPlanNoteClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedPlanNoteClient
The current PaginatedPlanNoteClient instance.
PostAsync(PlanNote, CancellationToken)
Creates a new PlanNote resource asynchronously.
public Task<PlanNoteResponse> PostAsync(PlanNote resource, CancellationToken cancellationToken = default)
Parameters
resourcePlanNoteThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PlanNoteResponse>
A task representing the asynchronous operation, containing the created PlanNote resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<PlanNoteResource>, CancellationToken)
Creates a new PlanNote resource asynchronously.
public Task<PlanNoteResponse> PostAsync(JsonApiDocument<PlanNoteResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<PlanNoteResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<PlanNoteResponse>
A task representing the asynchronous operation, containing the created PlanNote resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public PlanNoteClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public PlanNoteClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a PlanNote client for a specific resource ID.
public PlanNoteClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- PlanNoteClient
A new instance of the resource client for the specified resource ID.