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