Class PaginatedEmailClient
- Namespace
- Crews.PlanningCenter.Api.People.V2025_07_02
- 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
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedEmailClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedEmailClient
The current PaginatedEmailClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedEmailClient ClearParameters()
Returns
- PaginatedEmailClient
The current PaginatedEmailClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedEmailClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedEmailClient
The current PaginatedEmailClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
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.
Offset(int)
Sets the item offset in the paginated response.
public PaginatedEmailClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedEmailClient
The current PaginatedEmailClient instance.
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
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedEmailClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedEmailClient
The current PaginatedEmailClient instance.
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.