Table of Contents

Class CampusClient

Namespace
Crews.PlanningCenter.Api.People.V2018_08_01
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

httpClient HttpClient
uri Uri

Properties

Lists

Associated Lists.

public PaginatedListClient Lists { get; }

Property Value

PaginatedListClient

ServiceTimes

Associated ServiceTimes.

public PaginatedServiceTimeClient ServiceTimes { get; }

Property Value

PaginatedServiceTimeClient

Methods

DeleteAsync(CancellationToken)

Deletes the Campus resource asynchronously.

public Task DeleteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A 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

cancellationToken CancellationToken

A 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

CampusClient

IncludeServiceTimes()

Include related ServiceTimes resources in the response.

public CampusClient IncludeServiceTimes()

Returns

CampusClient

PatchAsync(Campus, CancellationToken)

Updates an existing Campus resource asynchronously.

public Task<CampusResponse> PatchAsync(Campus resource, CancellationToken cancellationToken = default)

Parameters

resource Campus

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<CampusResource>

The JSON:API document to be sent in the patch request.

cancellationToken CancellationToken

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