Table of Contents

Class PaginatedHouseholdClient

Namespace
Crews.PlanningCenter.Api.People.V2020_04_06
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with Household collection resources.

public class PaginatedHouseholdClient : PaginatedResourceClient<Household, HouseholdResource, HouseholdCollectionResponse, HouseholdResponse>
Inheritance
PaginatedHouseholdClient
Inherited Members

Constructors

PaginatedHouseholdClient(HttpClient, Uri)

Client for interacting with Household collection resources.

public PaginatedHouseholdClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of Household resources asynchronously.

public Task<HouseholdCollectionResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A 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

HouseholdClient

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public HouseholdClient OrderByCreatedAt()

Returns

HouseholdClient

OrderByCreatedAtDescending()

Sort response items by the CreatedAt attribute. Use reverse order.

public HouseholdClient OrderByCreatedAtDescending()

Returns

HouseholdClient

OrderByMemberCount()

Sort response items by the MemberCount attribute.

public HouseholdClient OrderByMemberCount()

Returns

HouseholdClient

OrderByMemberCountDescending()

Sort response items by the MemberCount attribute. Use reverse order.

public HouseholdClient OrderByMemberCountDescending()

Returns

HouseholdClient

OrderByName()

Sort response items by the Name attribute.

public HouseholdClient OrderByName()

Returns

HouseholdClient

OrderByNameDescending()

Sort response items by the Name attribute. Use reverse order.

public HouseholdClient OrderByNameDescending()

Returns

HouseholdClient

OrderByPrimaryContactName()

Sort response items by the PrimaryContactName attribute.

public HouseholdClient OrderByPrimaryContactName()

Returns

HouseholdClient

OrderByPrimaryContactNameDescending()

Sort response items by the PrimaryContactName attribute. Use reverse order.

public HouseholdClient OrderByPrimaryContactNameDescending()

Returns

HouseholdClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public HouseholdClient OrderByUpdatedAt()

Returns

HouseholdClient

OrderByUpdatedAtDescending()

Sort response items by the UpdatedAt attribute. Use reverse order.

public HouseholdClient OrderByUpdatedAtDescending()

Returns

HouseholdClient

PostAsync(Household, CancellationToken)

Creates a new Household resource asynchronously.

public Task<HouseholdResponse> PostAsync(Household resource, CancellationToken cancellationToken = default)

Parameters

resource Household

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A 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

document JsonApiDocument<HouseholdResource>

The JSON:API document to be sent in the POST request.

cancellationToken CancellationToken

A 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

value DateTime

Returns

HouseholdClient

WhereMemberCount(int)

Query response items by the MemberCount attribute.

public HouseholdClient WhereMemberCount(int value)

Parameters

value int

Returns

HouseholdClient

WhereName(string)

Query response items by the Name attribute.

public HouseholdClient WhereName(string value)

Parameters

value string

Returns

HouseholdClient

WherePrimaryContactName(string)

Query response items by the PrimaryContactName attribute.

public HouseholdClient WherePrimaryContactName(string value)

Parameters

value string

Returns

HouseholdClient

WhereUpdatedAt(DateTime)

Query response items by the UpdatedAt attribute.

public HouseholdClient WhereUpdatedAt(DateTime value)

Parameters

value DateTime

Returns

HouseholdClient

WithId(string)

Creates a new instance of a Household client for a specific resource ID.

public HouseholdClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

HouseholdClient

A new instance of the resource client for the specified resource ID.