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
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Team resources asynchronously.
public Task<TeamCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
IncludePersonTeamPositionAssignments()
Include related PersonTeamPositionAssignments resources in the response.
public TeamClient IncludePersonTeamPositionAssignments()
Returns
IncludeServiceTypes()
Include related ServiceTypes resources in the response.
public TeamClient IncludeServiceTypes()
Returns
IncludeTeamLeaders()
Include related TeamLeaders resources in the response.
public TeamClient IncludeTeamLeaders()
Returns
IncludeTeamPositions()
Include related TeamPositions resources in the response.
public TeamClient IncludeTeamPositions()
Returns
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public TeamClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public TeamClient OrderByCreatedAtDescending()
Returns
OrderByName()
Sort response items by the Name attribute.
public TeamClient OrderByName()
Returns
OrderByNameDescending()
Sort response items by the Name attribute. Use reverse order.
public TeamClient OrderByNameDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public TeamClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public TeamClient OrderByUpdatedAtDescending()
Returns
PostAsync(Team, CancellationToken)
Creates a new Team resource asynchronously.
public Task<TeamResponse> PostAsync(Team resource, CancellationToken cancellationToken = default)
Parameters
resourceTeamThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<TeamResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA 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
valuestring
Returns
WithId(string)
Creates a new instance of a Team client for a specific resource ID.
public TeamClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- TeamClient
A new instance of the resource client for the specified resource ID.