Class PaginatedEmailClient
- Namespace
- Crews.PlanningCenter.Api.People.V2025_11_10
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Email collection resources.
public class PaginatedEmailClient : PaginatedResourceClient<Email, EmailResource, EmailCollectionResponse, EmailResponse>
- Inheritance
-
PaginatedEmailClient
- Inherited Members
Constructors
PaginatedEmailClient(HttpClient, Uri)
Client for interacting with Email collection resources.
public PaginatedEmailClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Email resources asynchronously.
public Task<EmailCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<EmailCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Email resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
OrderByAddress()
Sort response items by the Address attribute.
public EmailClient OrderByAddress()
Returns
OrderByAddressDescending()
Sort response items by the Address attribute. Use reverse order.
public EmailClient OrderByAddressDescending()
Returns
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public EmailClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public EmailClient OrderByCreatedAtDescending()
Returns
OrderByLocation()
Sort response items by the Location attribute.
public EmailClient OrderByLocation()
Returns
OrderByLocationDescending()
Sort response items by the Location attribute. Use reverse order.
public EmailClient OrderByLocationDescending()
Returns
OrderByPrimary()
Sort response items by the Primary attribute.
public EmailClient OrderByPrimary()
Returns
OrderByPrimaryDescending()
Sort response items by the Primary attribute. Use reverse order.
public EmailClient OrderByPrimaryDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public EmailClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public EmailClient OrderByUpdatedAtDescending()
Returns
PostAsync(Email, CancellationToken)
Creates a new Email resource asynchronously.
public Task<EmailResponse> PostAsync(Email resource, CancellationToken cancellationToken = default)
Parameters
resourceEmailThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<EmailResponse>
A task representing the asynchronous operation, containing the created Email resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<EmailResource>, CancellationToken)
Creates a new Email resource asynchronously.
public Task<EmailResponse> PostAsync(JsonApiDocument<EmailResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<EmailResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<EmailResponse>
A task representing the asynchronous operation, containing the created Email resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereAddress(string)
Query response items by the Address attribute.
public EmailClient WhereAddress(string value)
Parameters
valuestring
Returns
WhereBlocked(bool)
Query response items by the Blocked attribute.
public EmailClient WhereBlocked(bool value)
Parameters
valuebool
Returns
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public EmailClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereLocation(string)
Query response items by the Location attribute.
public EmailClient WhereLocation(string value)
Parameters
valuestring
Returns
WherePrimary(bool)
Query response items by the Primary attribute.
public EmailClient WherePrimary(bool value)
Parameters
valuebool
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public EmailClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a Email client for a specific resource ID.
public EmailClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- EmailClient
A new instance of the resource client for the specified resource ID.