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