Table of Contents

Class PaginatedTeamClient

Namespace
Crews.PlanningCenter.Api.Services.V2018_11_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with Team collection resources.

public class PaginatedTeamClient : PaginatedResourceClient<Team, TeamResource, TeamCollectionResponse, TeamResponse>
Inheritance
PaginatedTeamClient
Inherited Members

Constructors

PaginatedTeamClient(HttpClient, Uri)

Client for interacting with Team collection resources.

public PaginatedTeamClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedTeamClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

PaginatedTeamClient

The current PaginatedTeamClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public PaginatedTeamClient ClearParameters()

Returns

PaginatedTeamClient

The current PaginatedTeamClient instance.

Filter(string)

Adds a filter query parameter to the request.

public PaginatedTeamClient Filter(string filter)

Parameters

filter string

The filter criteria.

Returns

PaginatedTeamClient

The current PaginatedTeamClient instance.

Remarks

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

GetAsync(CancellationToken)

Fetches a paginated list of Team resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<TeamCollectionResponse>

A task representing the asynchronous operation, containing a paginated list of Team resources.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludePeople()

Include related People resources in the response.

public TeamClient IncludePeople()

Returns

TeamClient

IncludePersonTeamPositionAssignments()

Include related PersonTeamPositionAssignments resources in the response.

public TeamClient IncludePersonTeamPositionAssignments()

Returns

TeamClient

IncludeServiceTypes()

Include related ServiceTypes resources in the response.

public TeamClient IncludeServiceTypes()

Returns

TeamClient

IncludeTeamLeaders()

Include related TeamLeaders resources in the response.

public TeamClient IncludeTeamLeaders()

Returns

TeamClient

IncludeTeamPositions()

Include related TeamPositions resources in the response.

public TeamClient IncludeTeamPositions()

Returns

TeamClient

Offset(int)

Sets the item offset in the paginated response.

public PaginatedTeamClient Offset(int count)

Parameters

count int

The number of items to skip.

Returns

PaginatedTeamClient

The current PaginatedTeamClient instance.

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public TeamClient OrderByCreatedAt()

Returns

TeamClient

OrderByCreatedAtDescending()

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

public TeamClient OrderByCreatedAtDescending()

Returns

TeamClient

OrderByName()

Sort response items by the Name attribute.

public TeamClient OrderByName()

Returns

TeamClient

OrderByNameDescending()

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

public TeamClient OrderByNameDescending()

Returns

TeamClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public TeamClient OrderByUpdatedAt()

Returns

TeamClient

OrderByUpdatedAtDescending()

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

public TeamClient OrderByUpdatedAtDescending()

Returns

TeamClient

PerPage(int)

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

public PaginatedTeamClient PerPage(int count)

Parameters

count int

The number of items to be returned per page.

Returns

PaginatedTeamClient

The current PaginatedTeamClient instance.

PostAsync(Team, CancellationToken)

Creates a new Team resource asynchronously.

public Task<TeamResponse> PostAsync(Team resource, CancellationToken cancellationToken = default)

Parameters

resource Team

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<TeamResponse>

A task representing the asynchronous operation, containing the created Team resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<TeamResource>, CancellationToken)

Creates a new Team resource asynchronously.

public Task<TeamResponse> PostAsync(JsonApiDocument<TeamResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<TeamResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<TeamResponse>

A task representing the asynchronous operation, containing the created Team resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereName(string)

Query response items by the Name attribute.

public TeamClient WhereName(string value)

Parameters

value string

Returns

TeamClient

WithId(string)

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

public TeamClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

TeamClient

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