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

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedChannelClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

PaginatedChannelClient

The current PaginatedChannelClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public PaginatedChannelClient ClearParameters()

Returns

PaginatedChannelClient

The current PaginatedChannelClient instance.

Filter(string)

Adds a filter query parameter to the request.

public PaginatedChannelClient Filter(string filter)

Parameters

filter string

The filter criteria.

Returns

PaginatedChannelClient

The current PaginatedChannelClient instance.

Remarks

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

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

Offset(int)

Sets the item offset in the paginated response.

public PaginatedChannelClient Offset(int count)

Parameters

count int

The number of items to skip.

Returns

PaginatedChannelClient

The current PaginatedChannelClient instance.

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

PerPage(int)

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

public PaginatedChannelClient PerPage(int count)

Parameters

count int

The number of items to be returned per page.

Returns

PaginatedChannelClient

The current PaginatedChannelClient instance.

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.