Table of Contents

Class PaginatedCampusClient

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

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedCampusClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

PaginatedCampusClient

The current PaginatedCampusClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public PaginatedCampusClient ClearParameters()

Returns

PaginatedCampusClient

The current PaginatedCampusClient instance.

Filter(string)

Adds a filter query parameter to the request.

public PaginatedCampusClient Filter(string filter)

Parameters

filter string

The filter criteria.

Returns

PaginatedCampusClient

The current PaginatedCampusClient instance.

Remarks

See Planning Center API documentation for details on supported filter values for this resource.

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

Offset(int)

Sets the item offset in the paginated response.

public PaginatedCampusClient Offset(int count)

Parameters

count int

The number of items to skip.

Returns

PaginatedCampusClient

The current PaginatedCampusClient instance.

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

PerPage(int)

Sets the number of items to be returned per page in the paginated response.

public PaginatedCampusClient PerPage(int count)

Parameters

count int

The number of items to be returned per page.

Returns

PaginatedCampusClient

The current PaginatedCampusClient instance.

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.