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