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
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedEpisodeClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedEpisodeClient
The current PaginatedEpisodeClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedEpisodeClient ClearParameters()
Returns
- PaginatedEpisodeClient
The current PaginatedEpisodeClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedEpisodeClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedEpisodeClient
The current PaginatedEpisodeClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
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
Offset(int)
Sets the item offset in the paginated response.
public PaginatedEpisodeClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedEpisodeClient
The current PaginatedEpisodeClient instance.
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
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedEpisodeClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedEpisodeClient
The current PaginatedEpisodeClient instance.
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.