Class PaginatedEpisodeClient
- Namespace
- Crews.PlanningCenter.Api.Publishing.V2024_03_25
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Episode collection resources.
public class PaginatedEpisodeClient : PaginatedResourceClient<Episode, EpisodeApiResource, EpisodeCollectionResponse, EpisodeResponse>
- Inheritance
-
PaginatedEpisodeClient
- Inherited Members
Constructors
PaginatedEpisodeClient(HttpClient, Uri)
Client for interacting with Episode collection resources.
public PaginatedEpisodeClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Episode resources asynchronously.
public Task<EpisodeCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<EpisodeCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Episode resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeChannel()
Include related Channel resources in the response.
public EpisodeClient IncludeChannel()
Returns
IncludeEpisodeResources()
Include related EpisodeResources resources in the response.
public EpisodeClient IncludeEpisodeResources()
Returns
IncludeEpisodeTimes()
Include related EpisodeTimes resources in the response.
public EpisodeClient IncludeEpisodeTimes()
Returns
IncludeSeries()
Include related Series resources in the response.
public EpisodeClient IncludeSeries()
Returns
IncludeSpeakerships()
Include related Speakerships resources in the response.
public EpisodeClient IncludeSpeakerships()
Returns
OrderByPublishedLiveAt()
Sort response items by the PublishedLiveAt attribute.
public EpisodeClient OrderByPublishedLiveAt()
Returns
OrderByPublishedLiveAtDescending()
Sort response items by the PublishedLiveAt attribute. Use reverse order.
public EpisodeClient OrderByPublishedLiveAtDescending()
Returns
OrderByPublishedToLibraryAt()
Sort response items by the PublishedToLibraryAt attribute.
public EpisodeClient OrderByPublishedToLibraryAt()
Returns
OrderByPublishedToLibraryAtDescending()
Sort response items by the PublishedToLibraryAt attribute. Use reverse order.
public EpisodeClient OrderByPublishedToLibraryAtDescending()
Returns
OrderByStreamType()
Sort response items by the StreamType attribute.
public EpisodeClient OrderByStreamType()
Returns
OrderByStreamTypeDescending()
Sort response items by the StreamType attribute. Use reverse order.
public EpisodeClient OrderByStreamTypeDescending()
Returns
OrderByTitle()
Sort response items by the Title attribute.
public EpisodeClient OrderByTitle()
Returns
OrderByTitleDescending()
Sort response items by the Title attribute. Use reverse order.
public EpisodeClient OrderByTitleDescending()
Returns
PostAsync(Episode, CancellationToken)
Creates a new Episode resource asynchronously.
public Task<EpisodeResponse> PostAsync(Episode resource, CancellationToken cancellationToken = default)
Parameters
resourceEpisodeThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<EpisodeResponse>
A task representing the asynchronous operation, containing the created Episode resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<EpisodeApiResource>, CancellationToken)
Creates a new Episode resource asynchronously.
public Task<EpisodeResponse> PostAsync(JsonApiDocument<EpisodeApiResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<EpisodeApiResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<EpisodeResponse>
A task representing the asynchronous operation, containing the created Episode resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereSeriesId(int)
Query response items by the SeriesId attribute.
public EpisodeClient WhereSeriesId(int value)
Parameters
valueint
Returns
WhereServicesPlanRemoteIdentifier(string)
Query response items by the ServicesPlanRemoteIdentifier attribute.
public EpisodeClient WhereServicesPlanRemoteIdentifier(string value)
Parameters
valuestring
Returns
WhereServicesServiceTypeRemoteIdentifier(string)
Query response items by the ServicesServiceTypeRemoteIdentifier attribute.
public EpisodeClient WhereServicesServiceTypeRemoteIdentifier(string value)
Parameters
valuestring
Returns
WithId(string)
Creates a new instance of a Episode client for a specific resource ID.
public EpisodeClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- EpisodeClient
A new instance of the resource client for the specified resource ID.