Table of Contents

Class PaginatedChannelClient

Namespace
Crews.PlanningCenter.Api.Publishing.V2018_08_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with Channel collection resources.

public class PaginatedChannelClient : PaginatedResourceClient<Channel, ChannelResource, ChannelCollectionResponse, ChannelResponse>
Inheritance
PaginatedChannelClient
Inherited Members

Constructors

PaginatedChannelClient(HttpClient, Uri)

Client for interacting with Channel collection resources.

public PaginatedChannelClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of Channel resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ChannelCollectionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeChannelDefaultEpisodeResources()

Include related ChannelDefaultEpisodeResources resources in the response.

public ChannelClient IncludeChannelDefaultEpisodeResources()

Returns

ChannelClient

IncludeChannelDefaultTimes()

Include related ChannelDefaultTimes resources in the response.

public ChannelClient IncludeChannelDefaultTimes()

Returns

ChannelClient

IncludeCurrentEpisode()

Include related CurrentEpisode resources in the response.

public ChannelClient IncludeCurrentEpisode()

Returns

ChannelClient

OrderByName()

Sort response items by the Name attribute.

public ChannelClient OrderByName()

Returns

ChannelClient

OrderByNameDescending()

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

public ChannelClient OrderByNameDescending()

Returns

ChannelClient

OrderByPosition()

Sort response items by the Position attribute.

public ChannelClient OrderByPosition()

Returns

ChannelClient

OrderByPositionDescending()

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

public ChannelClient OrderByPositionDescending()

Returns

ChannelClient

PostAsync(Channel, CancellationToken)

Creates a new Channel resource asynchronously.

public Task<ChannelResponse> PostAsync(Channel resource, CancellationToken cancellationToken = default)

Parameters

resource Channel

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ChannelResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<ChannelResource>, CancellationToken)

Creates a new Channel resource asynchronously.

public Task<ChannelResponse> PostAsync(JsonApiDocument<ChannelResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<ChannelResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ChannelResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WithId(string)

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

public ChannelClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

ChannelClient

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