Table of Contents

Class PaginatedCampusClient

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

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of Campus resources asynchronously.

public Task<CampusCollectionResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A 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

CampusClient

IncludeServiceTimes()

Include related ServiceTimes resources in the response.

public CampusClient IncludeServiceTimes()

Returns

CampusClient

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public CampusClient OrderByCreatedAt()

Returns

CampusClient

OrderByCreatedAtDescending()

Sort response items by the CreatedAt attribute. Use reverse order.

public CampusClient OrderByCreatedAtDescending()

Returns

CampusClient

OrderByName()

Sort response items by the Name attribute.

public CampusClient OrderByName()

Returns

CampusClient

OrderByNameDescending()

Sort response items by the Name attribute. Use reverse order.

public CampusClient OrderByNameDescending()

Returns

CampusClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public CampusClient OrderByUpdatedAt()

Returns

CampusClient

OrderByUpdatedAtDescending()

Sort response items by the UpdatedAt attribute. Use reverse order.

public CampusClient OrderByUpdatedAtDescending()

Returns

CampusClient

PostAsync(Campus, CancellationToken)

Creates a new Campus resource asynchronously.

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

Parameters

resource Campus

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<CampusResource>

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

cancellationToken CancellationToken

A 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

value DateTime

Returns

CampusClient

WhereId(string)

Query response items by the Id attribute.

public CampusClient WhereId(string value)

Parameters

value string

Returns

CampusClient

WhereUpdatedAt(DateTime)

Query response items by the UpdatedAt attribute.

public CampusClient WhereUpdatedAt(DateTime value)

Parameters

value DateTime

Returns

CampusClient

WithId(string)

Creates a new instance of a Campus client for a specific resource ID.

public CampusClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

CampusClient

A new instance of the resource client for the specified resource ID.