Class PaginatedSongClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Song collection resources.
public class PaginatedSongClient : PaginatedResourceClient<Song, SongResource, SongCollectionResponse, SongResponse>
- Inheritance
-
PaginatedSongClient
- Inherited Members
Constructors
PaginatedSongClient(HttpClient, Uri)
Client for interacting with Song collection resources.
public PaginatedSongClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Song resources asynchronously.
public Task<SongCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<SongCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Song resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public SongClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public SongClient OrderByCreatedAtDescending()
Returns
OrderByLastScheduledAt()
Sort response items by the LastScheduledAt attribute.
public SongClient OrderByLastScheduledAt()
Returns
OrderByLastScheduledAtDescending()
Sort response items by the LastScheduledAt attribute. Use reverse order.
public SongClient OrderByLastScheduledAtDescending()
Returns
OrderByTitle()
Sort response items by the Title attribute.
public SongClient OrderByTitle()
Returns
OrderByTitleDescending()
Sort response items by the Title attribute. Use reverse order.
public SongClient OrderByTitleDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public SongClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public SongClient OrderByUpdatedAtDescending()
Returns
PostAsync(Song, CancellationToken)
Creates a new Song resource asynchronously.
public Task<SongResponse> PostAsync(Song resource, CancellationToken cancellationToken = default)
Parameters
resourceSongThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<SongResponse>
A task representing the asynchronous operation, containing the created Song resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<SongResource>, CancellationToken)
Creates a new Song resource asynchronously.
public Task<SongResponse> PostAsync(JsonApiDocument<SongResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<SongResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<SongResponse>
A task representing the asynchronous operation, containing the created Song resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereAuthor(string)
Query response items by the Author attribute.
public SongClient WhereAuthor(string value)
Parameters
valuestring
Returns
WhereCcliNumber(int)
Query response items by the CcliNumber attribute.
public SongClient WhereCcliNumber(int value)
Parameters
valueint
Returns
WhereHidden(bool)
Query response items by the Hidden attribute.
public SongClient WhereHidden(bool value)
Parameters
valuebool
Returns
WhereThemes(string)
Query response items by the Themes attribute.
public SongClient WhereThemes(string value)
Parameters
valuestring
Returns
WhereTitle(string)
Query response items by the Title attribute.
public SongClient WhereTitle(string value)
Parameters
valuestring
Returns
WithId(string)
Creates a new instance of a Song client for a specific resource ID.
public SongClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- SongClient
A new instance of the resource client for the specified resource ID.