Class ReportClient
- Namespace
- Crews.PlanningCenter.Api.People.V2022_07_14
- 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
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public ReportClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- ReportClient
The current ReportClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public ReportClient ClearParameters()
Returns
- ReportClient
The current ReportClient instance.
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.