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