Table of Contents

Class PaginatedSongClient

Namespace
Crews.PlanningCenter.Api.Services.V2018_11_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

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedSongClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

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

filter string

The 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

cancellationToken CancellationToken

A 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

count int

The number of items to skip.

Returns

PaginatedSongClient

The current PaginatedSongClient instance.

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public SongClient OrderByCreatedAt()

Returns

SongClient

OrderByCreatedAtDescending()

Sort response items by the CreatedAt attribute. Use reverse order.

public SongClient OrderByCreatedAtDescending()

Returns

SongClient

OrderByLastScheduledAt()

Sort response items by the LastScheduledAt attribute.

public SongClient OrderByLastScheduledAt()

Returns

SongClient

OrderByLastScheduledAtDescending()

Sort response items by the LastScheduledAt attribute. Use reverse order.

public SongClient OrderByLastScheduledAtDescending()

Returns

SongClient

OrderByTitle()

Sort response items by the Title attribute.

public SongClient OrderByTitle()

Returns

SongClient

OrderByTitleDescending()

Sort response items by the Title attribute. Use reverse order.

public SongClient OrderByTitleDescending()

Returns

SongClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public SongClient OrderByUpdatedAt()

Returns

SongClient

OrderByUpdatedAtDescending()

Sort response items by the UpdatedAt attribute. Use reverse order.

public SongClient OrderByUpdatedAtDescending()

Returns

SongClient

PerPage(int)

Sets the number of items to be returned per page in the paginated response.

public PaginatedSongClient PerPage(int count)

Parameters

count int

The 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

resource Song

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<SongResource>

The JSON:API document to be sent in the POST request.

cancellationToken CancellationToken

A 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

value string

Returns

SongClient

WhereCcliNumber(int)

Query response items by the CcliNumber attribute.

public SongClient WhereCcliNumber(int value)

Parameters

value int

Returns

SongClient

WhereHidden(bool)

Query response items by the Hidden attribute.

public SongClient WhereHidden(bool value)

Parameters

value bool

Returns

SongClient

WhereThemes(string)

Query response items by the Themes attribute.

public SongClient WhereThemes(string value)

Parameters

value string

Returns

SongClient

WhereTitle(string)

Query response items by the Title attribute.

public SongClient WhereTitle(string value)

Parameters

value string

Returns

SongClient

WithId(string)

Creates a new instance of a Song client for a specific resource ID.

public SongClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

SongClient

A new instance of the resource client for the specified resource ID.