Table of Contents

Class PaginatedMediaClient

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

Client for interacting with Media collection resources.

public class PaginatedMediaClient : PaginatedResourceClient<Media, MediaResource, MediaCollectionResponse, MediaResponse>
Inheritance
PaginatedMediaClient
Inherited Members

Constructors

PaginatedMediaClient(HttpClient, Uri)

Client for interacting with Media collection resources.

public PaginatedMediaClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of Media resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MediaCollectionResponse>

A task representing the asynchronous operation, containing a paginated list of Media resources.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeAttachments()

Include related Attachments resources in the response.

public MediaClient IncludeAttachments()

Returns

MediaClient

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public MediaClient OrderByCreatedAt()

Returns

MediaClient

OrderByCreatedAtDescending()

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

public MediaClient OrderByCreatedAtDescending()

Returns

MediaClient

OrderByTitle()

Sort response items by the Title attribute.

public MediaClient OrderByTitle()

Returns

MediaClient

OrderByTitleDescending()

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

public MediaClient OrderByTitleDescending()

Returns

MediaClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public MediaClient OrderByUpdatedAt()

Returns

MediaClient

OrderByUpdatedAtDescending()

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

public MediaClient OrderByUpdatedAtDescending()

Returns

MediaClient

PostAsync(Media, CancellationToken)

Creates a new Media resource asynchronously.

public Task<MediaResponse> PostAsync(Media resource, CancellationToken cancellationToken = default)

Parameters

resource Media

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MediaResponse>

A task representing the asynchronous operation, containing the created Media resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<MediaResource>, CancellationToken)

Creates a new Media resource asynchronously.

public Task<MediaResponse> PostAsync(JsonApiDocument<MediaResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<MediaResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MediaResponse>

A task representing the asynchronous operation, containing the created Media resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereCreatorName(string)

Query response items by the CreatorName attribute.

public MediaClient WhereCreatorName(string value)

Parameters

value string

Returns

MediaClient

WhereId(string)

Query response items by the Id attribute.

public MediaClient WhereId(string value)

Parameters

value string

Returns

MediaClient

WhereThemes(string)

Query response items by the Themes attribute.

public MediaClient WhereThemes(string value)

Parameters

value string

Returns

MediaClient

WhereTitle(string)

Query response items by the Title attribute.

public MediaClient WhereTitle(string value)

Parameters

value string

Returns

MediaClient

WithId(string)

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

public MediaClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

MediaClient

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