Class PaginatedHouseholdClient
- Namespace
- Crews.PlanningCenter.Api.People.V2025_11_10
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Household collection resources.
public class PaginatedHouseholdClient : PaginatedResourceClient<Household, HouseholdResource, HouseholdCollectionResponse, HouseholdResponse>
- Inheritance
-
PaginatedResourceClient<Household, HouseholdResource, HouseholdCollectionResponse, HouseholdResponse>PaginatedHouseholdClient
- Inherited Members
Constructors
PaginatedHouseholdClient(HttpClient, Uri)
Client for interacting with Household collection resources.
public PaginatedHouseholdClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Household resources asynchronously.
public Task<HouseholdCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<HouseholdCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Household resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludePeople()
Include related People resources in the response.
public HouseholdClient IncludePeople()
Returns
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public HouseholdClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public HouseholdClient OrderByCreatedAtDescending()
Returns
OrderByMemberCount()
Sort response items by the MemberCount attribute.
public HouseholdClient OrderByMemberCount()
Returns
OrderByMemberCountDescending()
Sort response items by the MemberCount attribute. Use reverse order.
public HouseholdClient OrderByMemberCountDescending()
Returns
OrderByName()
Sort response items by the Name attribute.
public HouseholdClient OrderByName()
Returns
OrderByNameDescending()
Sort response items by the Name attribute. Use reverse order.
public HouseholdClient OrderByNameDescending()
Returns
OrderByPrimaryContactName()
Sort response items by the PrimaryContactName attribute.
public HouseholdClient OrderByPrimaryContactName()
Returns
OrderByPrimaryContactNameDescending()
Sort response items by the PrimaryContactName attribute. Use reverse order.
public HouseholdClient OrderByPrimaryContactNameDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public HouseholdClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public HouseholdClient OrderByUpdatedAtDescending()
Returns
PostAsync(Household, CancellationToken)
Creates a new Household resource asynchronously.
public Task<HouseholdResponse> PostAsync(Household resource, CancellationToken cancellationToken = default)
Parameters
resourceHouseholdThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<HouseholdResponse>
A task representing the asynchronous operation, containing the created Household resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<HouseholdResource>, CancellationToken)
Creates a new Household resource asynchronously.
public Task<HouseholdResponse> PostAsync(JsonApiDocument<HouseholdResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<HouseholdResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<HouseholdResponse>
A task representing the asynchronous operation, containing the created Household resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public HouseholdClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereMemberCount(int)
Query response items by the MemberCount attribute.
public HouseholdClient WhereMemberCount(int value)
Parameters
valueint
Returns
WhereName(string)
Query response items by the Name attribute.
public HouseholdClient WhereName(string value)
Parameters
valuestring
Returns
WherePrimaryContactName(string)
Query response items by the PrimaryContactName attribute.
public HouseholdClient WherePrimaryContactName(string value)
Parameters
valuestring
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public HouseholdClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a Household client for a specific resource ID.
public HouseholdClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- HouseholdClient
A new instance of the resource client for the specified resource ID.