Table of Contents

Class ResourceClient

Namespace
Crews.PlanningCenter.Api.Groups.V2018_08_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with the Resource resource.

public class ResourceClient : SingletonResourceClient<Resource, ResourceResource, ResourceResponse>
Inheritance
ResourceClient
Inherited Members

Constructors

ResourceClient(HttpClient, Uri)

Client for interacting with the Resource resource.

public ResourceClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Download

Associated Download.

public ResourceClient Download { get; }

Property Value

ResourceClient

Visit

Associated Visit.

public ResourceClient Visit { get; }

Property Value

ResourceClient

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public ResourceClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

ResourceClient

The current ResourceClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public ResourceClient ClearParameters()

Returns

ResourceClient

The current ResourceClient instance.

GetAsync(CancellationToken)

Fetches the Resource resource asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ResourceResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.