Class ResourceClient
- Namespace
- Crews.PlanningCenter.Api.Calendar.V2021_07_20
- 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
Conflicts
Associated Conflicts.
public PaginatedConflictClient Conflicts { get; }
Property Value
EventResourceRequests
Associated EventResourceRequests.
public PaginatedEventResourceRequestClient EventResourceRequests { get; }
Property Value
RequiredApprovals
Associated RequiredApprovals.
public PaginatedRequiredApprovalClient RequiredApprovals { get; }
Property Value
ResourceApprovalGroups
Associated ResourceApprovalGroups.
public PaginatedResourceApprovalGroupClient ResourceApprovalGroups { get; }
Property Value
ResourceBookings
Associated ResourceBookings.
public PaginatedResourceBookingClient ResourceBookings { get; }
Property Value
ResourceFolder
Associated ResourceFolder.
public ResourceFolderClient ResourceFolder { get; }
Property Value
ResourceQuestions
Associated ResourceQuestions.
public PaginatedResourceQuestionClient ResourceQuestions { get; }
Property Value
RoomSetups
Associated RoomSetups.
public PaginatedRoomSetupClient RoomSetups { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the Resource 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 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.
IncludeResourceApprovalGroups()
Include related ResourceApprovalGroups resources in the response.
public ResourceClient IncludeResourceApprovalGroups()
Returns
IncludeResourceFolder()
Include related ResourceFolder resources in the response.
public ResourceClient IncludeResourceFolder()
Returns
IncludeResourceQuestions()
Include related ResourceQuestions resources in the response.
public ResourceClient IncludeResourceQuestions()
Returns
IncludeRoomSetups()
Include related RoomSetups resources in the response.
public ResourceClient IncludeRoomSetups()
Returns
PatchAsync(Resource, CancellationToken)
Updates an existing Resource resource asynchronously.
public Task<ResourceResponse> PatchAsync(Resource resource, CancellationToken cancellationToken = default)
Parameters
resourceResourceThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ResourceResponse>
A task representing the asynchronous operation, containing the updated Resource resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<ResourceResource>, CancellationToken)
Updates an existing Resource resource asynchronously.
public Task<ResourceResponse> PatchAsync(JsonApiDocument<ResourceResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<ResourceResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<ResourceResponse>
A task representing the asynchronous operation, containing the updated Resource resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.