Class CampusClient
- Namespace
- Crews.PlanningCenter.Api.People.V2025_03_20
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Campus resource.
public class CampusClient : SingletonResourceClient<Campus, CampusResource, CampusResponse>
- Inheritance
-
CampusClient
- Inherited Members
Constructors
CampusClient(HttpClient, Uri)
Client for interacting with the Campus resource.
public CampusClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Lists
Associated Lists.
public PaginatedListClient Lists { get; }
Property Value
ServiceTimes
Associated ServiceTimes.
public PaginatedServiceTimeClient ServiceTimes { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Campus resource asynchronously.
public Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task
A task representing the asynchronous delete operation.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
GetAsync(CancellationToken)
Fetches the Campus resource asynchronously.
public Task<CampusResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<CampusResponse>
A task representing the asynchronous operation, containing the Campus resource.
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
PatchAsync(Campus, CancellationToken)
Updates an existing Campus resource asynchronously.
public Task<CampusResponse> PatchAsync(Campus resource, CancellationToken cancellationToken = default)
Parameters
resourceCampusThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<CampusResponse>
A task representing the asynchronous operation, containing the updated Campus resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<CampusResource>, CancellationToken)
Updates an existing Campus resource asynchronously.
public Task<CampusResponse> PatchAsync(JsonApiDocument<CampusResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<CampusResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<CampusResponse>
A task representing the asynchronous operation, containing the updated Campus resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.