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