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
httpClientHttpClienturiUri
Properties
Download
Associated Download.
public ResourceClient Download { get; }
Property Value
Visit
Associated Visit.
public ResourceClient Visit { get; }
Property Value
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public ResourceClient AddCustomParameter(string parameter, string value)
Parameters
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
cancellationTokenCancellationTokenA 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.