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
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.
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.