Table of Contents

Class PaginatedResourceClient

Namespace
Crews.PlanningCenter.Api.Calendar.V2020_04_08
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with Resource collection resources.

public class PaginatedResourceClient : PaginatedResourceClient<Resource, ResourceResource, ResourceCollectionResponse, ResourceResponse>
Inheritance
PaginatedResourceClient
Inherited Members

Constructors

PaginatedResourceClient(HttpClient, Uri)

Client for interacting with Resource collection resources.

public PaginatedResourceClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of Resource resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ResourceCollectionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeResourceApprovalGroups()

Include related ResourceApprovalGroups resources in the response.

public ResourceClient IncludeResourceApprovalGroups()

Returns

ResourceClient

IncludeResourceFolder()

Include related ResourceFolder resources in the response.

public ResourceClient IncludeResourceFolder()

Returns

ResourceClient

IncludeResourceQuestions()

Include related ResourceQuestions resources in the response.

public ResourceClient IncludeResourceQuestions()

Returns

ResourceClient

IncludeRoomSetups()

Include related RoomSetups resources in the response.

public ResourceClient IncludeRoomSetups()

Returns

ResourceClient

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public ResourceClient OrderByCreatedAt()

Returns

ResourceClient

OrderByCreatedAtDescending()

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

public ResourceClient OrderByCreatedAtDescending()

Returns

ResourceClient

OrderByExpiresAt()

Sort response items by the ExpiresAt attribute.

public ResourceClient OrderByExpiresAt()

Returns

ResourceClient

OrderByExpiresAtDescending()

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

public ResourceClient OrderByExpiresAtDescending()

Returns

ResourceClient

OrderByName()

Sort response items by the Name attribute.

public ResourceClient OrderByName()

Returns

ResourceClient

OrderByNameDescending()

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

public ResourceClient OrderByNameDescending()

Returns

ResourceClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public ResourceClient OrderByUpdatedAt()

Returns

ResourceClient

OrderByUpdatedAtDescending()

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

public ResourceClient OrderByUpdatedAtDescending()

Returns

ResourceClient

PostAsync(Resource, CancellationToken)

Creates a new Resource resource asynchronously.

public Task<ResourceResponse> PostAsync(Resource resource, CancellationToken cancellationToken = default)

Parameters

resource Resource

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ResourceResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<ResourceResource>, CancellationToken)

Creates a new Resource resource asynchronously.

public Task<ResourceResponse> PostAsync(JsonApiDocument<ResourceResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<ResourceResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ResourceResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereCreatedAt(DateTime)

Query response items by the CreatedAt attribute.

public ResourceClient WhereCreatedAt(DateTime value)

Parameters

value DateTime

Returns

ResourceClient

WhereKind(string)

Query response items by the Kind attribute.

public ResourceClient WhereKind(string value)

Parameters

value string

Returns

ResourceClient

WhereName(string)

Query response items by the Name attribute.

public ResourceClient WhereName(string value)

Parameters

value string

Returns

ResourceClient

WherePathName(string)

Query response items by the PathName attribute.

public ResourceClient WherePathName(string value)

Parameters

value string

Returns

ResourceClient

WhereSerialNumber(string)

Query response items by the SerialNumber attribute.

public ResourceClient WhereSerialNumber(string value)

Parameters

value string

Returns

ResourceClient

WhereUpdatedAt(DateTime)

Query response items by the UpdatedAt attribute.

public ResourceClient WhereUpdatedAt(DateTime value)

Parameters

value DateTime

Returns

ResourceClient

WithId(string)

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

public ResourceClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

ResourceClient

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