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