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
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Channel resources asynchronously.
public Task<ChannelCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
IncludeChannelDefaultTimes()
Include related ChannelDefaultTimes resources in the response.
public ChannelClient IncludeChannelDefaultTimes()
Returns
IncludeCurrentEpisode()
Include related CurrentEpisode resources in the response.
public ChannelClient IncludeCurrentEpisode()
Returns
OrderByName()
Sort response items by the Name attribute.
public ChannelClient OrderByName()
Returns
OrderByNameDescending()
Sort response items by the Name attribute. Use reverse order.
public ChannelClient OrderByNameDescending()
Returns
OrderByPosition()
Sort response items by the Position attribute.
public ChannelClient OrderByPosition()
Returns
OrderByPositionDescending()
Sort response items by the Position attribute. Use reverse order.
public ChannelClient OrderByPositionDescending()
Returns
PostAsync(Channel, CancellationToken)
Creates a new Channel resource asynchronously.
public Task<ChannelResponse> PostAsync(Channel resource, CancellationToken cancellationToken = default)
Parameters
resourceChannelThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<ChannelResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA 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
idstringThe ID of the resource to create a client for.
Returns
- ChannelClient
A new instance of the resource client for the specified resource ID.