Class PaginatedFormCategoryClient
- Namespace
- Crews.PlanningCenter.Api.People.V2022_01_28
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with FormCategory collection resources.
public class PaginatedFormCategoryClient : PaginatedResourceClient<FormCategory, FormCategoryResource, FormCategoryCollectionResponse, FormCategoryResponse>
- Inheritance
-
PaginatedResourceClient<FormCategory, FormCategoryResource, FormCategoryCollectionResponse, FormCategoryResponse>PaginatedFormCategoryClient
- Inherited Members
Constructors
PaginatedFormCategoryClient(HttpClient, Uri)
Client for interacting with FormCategory collection resources.
public PaginatedFormCategoryClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of FormCategory resources asynchronously.
public Task<FormCategoryCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<FormCategoryCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of FormCategory resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public FormCategoryClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public FormCategoryClient OrderByCreatedAtDescending()
Returns
OrderByName()
Sort response items by the Name attribute.
public FormCategoryClient OrderByName()
Returns
OrderByNameDescending()
Sort response items by the Name attribute. Use reverse order.
public FormCategoryClient OrderByNameDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public FormCategoryClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public FormCategoryClient OrderByUpdatedAtDescending()
Returns
PostAsync(FormCategory, CancellationToken)
Creates a new FormCategory resource asynchronously.
public Task<FormCategoryResponse> PostAsync(FormCategory resource, CancellationToken cancellationToken = default)
Parameters
resourceFormCategoryThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<FormCategoryResponse>
A task representing the asynchronous operation, containing the created FormCategory resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<FormCategoryResource>, CancellationToken)
Creates a new FormCategory resource asynchronously.
public Task<FormCategoryResponse> PostAsync(JsonApiDocument<FormCategoryResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<FormCategoryResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<FormCategoryResponse>
A task representing the asynchronous operation, containing the created FormCategory resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public FormCategoryClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereName(string)
Query response items by the Name attribute.
public FormCategoryClient WhereName(string value)
Parameters
valuestring
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public FormCategoryClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a FormCategory client for a specific resource ID.
public FormCategoryClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- FormCategoryClient
A new instance of the resource client for the specified resource ID.