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