Class ResourceFolderClient
- Namespace
- Crews.PlanningCenter.Api.Calendar.V2020_04_08
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the ResourceFolder resource.
public class ResourceFolderClient : SingletonResourceClient<ResourceFolder, ResourceFolderResource, ResourceFolderResponse>
- Inheritance
-
ResourceFolderClient
- Inherited Members
Constructors
ResourceFolderClient(HttpClient, Uri)
Client for interacting with the ResourceFolder resource.
public ResourceFolderClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Resources
Associated Resources.
public PaginatedResourceClient Resources { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the ResourceFolder resource asynchronously.
public Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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 ResourceFolder resource asynchronously.
public Task<ResourceFolderResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ResourceFolderResponse>
A task representing the asynchronous operation, containing the ResourceFolder resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeResources()
Include related Resources resources in the response.
public ResourceFolderClient IncludeResources()
Returns
PatchAsync(ResourceFolder, CancellationToken)
Updates an existing ResourceFolder resource asynchronously.
public Task<ResourceFolderResponse> PatchAsync(ResourceFolder resource, CancellationToken cancellationToken = default)
Parameters
resourceResourceFolderThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ResourceFolderResponse>
A task representing the asynchronous operation, containing the updated ResourceFolder resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<ResourceFolderResource>, CancellationToken)
Updates an existing ResourceFolder resource asynchronously.
public Task<ResourceFolderResponse> PatchAsync(JsonApiDocument<ResourceFolderResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<ResourceFolderResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ResourceFolderResponse>
A task representing the asynchronous operation, containing the updated ResourceFolder resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.