Class ChannelClient
- Namespace
- Crews.PlanningCenter.Api.Publishing.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Channel resource.
public class ChannelClient : SingletonResourceClient<Channel, ChannelResource, ChannelResponse>
- Inheritance
-
ChannelClient
- Inherited Members
Constructors
ChannelClient(HttpClient, Uri)
Client for interacting with the Channel resource.
public ChannelClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
ChannelDefaultEpisodeResources
Associated ChannelDefaultEpisodeResources.
public PaginatedChannelDefaultEpisodeResourceClient ChannelDefaultEpisodeResources { get; }
Property Value
ChannelDefaultTimes
Associated ChannelDefaultTimes.
public PaginatedChannelDefaultTimeClient ChannelDefaultTimes { get; }
Property Value
CurrentEpisode
Associated CurrentEpisode.
public EpisodeClient CurrentEpisode { get; }
Property Value
Episodes
Associated Episodes.
public PaginatedEpisodeClient Episodes { get; }
Property Value
NextTimes
Associated NextTimes.
public PaginatedChannelNextTimeClient NextTimes { get; }
Property Value
Series
Associated Series.
public SeriesClient Series { get; }
Property Value
Statistics
Associated Statistics.
public PaginatedEpisodeStatisticsClient Statistics { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Channel resource asynchronously.
public Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task
A task representing the asynchronous delete operation.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
GetAsync(CancellationToken)
Fetches the Channel resource asynchronously.
public Task<ChannelResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ChannelResponse>
A task representing the asynchronous operation, containing the Channel resource.
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
PatchAsync(Channel, CancellationToken)
Updates an existing Channel resource asynchronously.
public Task<ChannelResponse> PatchAsync(Channel resource, CancellationToken cancellationToken = default)
Parameters
resourceChannelThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ChannelResponse>
A task representing the asynchronous operation, containing the updated Channel resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<ChannelResource>, CancellationToken)
Updates an existing Channel resource asynchronously.
public Task<ChannelResponse> PatchAsync(JsonApiDocument<ChannelResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<ChannelResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ChannelResponse>
A task representing the asynchronous operation, containing the updated Channel resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.