Table of Contents

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

httpClient HttpClient
uri Uri

Methods

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.

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

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.