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