Table of Contents

Class SongClient

Namespace
Crews.PlanningCenter.Api.Services.V2018_11_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with the Song resource.

public class SongClient : SingletonResourceClient<Song, SongResource, SongResponse>
Inheritance
SongClient
Inherited Members

Constructors

SongClient(HttpClient, Uri)

Client for interacting with the Song resource.

public SongClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Arrangements

Associated Arrangements.

public PaginatedArrangementClient Arrangements { get; }

Property Value

PaginatedArrangementClient

Attachments

Associated Attachments.

public PaginatedAttachmentClient Attachments { get; }

Property Value

PaginatedAttachmentClient

LastScheduledItem

Associated LastScheduledItem.

public ItemClient LastScheduledItem { get; }

Property Value

ItemClient

SongSchedules

Associated SongSchedules.

public PaginatedSongScheduleClient SongSchedules { get; }

Property Value

PaginatedSongScheduleClient

Tags

Associated Tags.

public PaginatedTagClient Tags { get; }

Property Value

PaginatedTagClient

Methods

AssignTagsAsync(CancellationToken)

Used to assign tags to a song.
All tags will be replaced so the full data set must be sent.

It expects a body that looks like:

``json
{
"data": {
"type": "TagAssignment",
"attributes": {},
"relationships": {
"tags": {
"data": [
{
"type": "Tag",
"id": "5"
}
]
}
}
}
}
<code><br /><br />On success you will get back a </code>204 No Content.

public Task AssignTagsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

DeleteAsync(CancellationToken)

Deletes the Song resource asynchronously.

public Task DeleteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task

A task representing the asynchronous delete operation.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

GetAsync(CancellationToken)

Fetches the Song resource asynchronously.

public Task<SongResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<SongResponse>

A task representing the asynchronous operation, containing the Song resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(Song, CancellationToken)

Updates an existing Song resource asynchronously.

public Task<SongResponse> PatchAsync(Song resource, CancellationToken cancellationToken = default)

Parameters

resource Song

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<SongResponse>

A task representing the asynchronous operation, containing the updated Song resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<SongResource>, CancellationToken)

Updates an existing Song resource asynchronously.

public Task<SongResponse> PatchAsync(JsonApiDocument<SongResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<SongResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<SongResponse>

A task representing the asynchronous operation, containing the updated Song resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.