Table of Contents

Class PaginatedMembershipClient

Namespace
Crews.PlanningCenter.Api.Groups.V2018_08_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with Membership collection resources.

public class PaginatedMembershipClient : PaginatedResourceClient<Membership, MembershipResource, MembershipCollectionResponse, MembershipResponse>
Inheritance
PaginatedMembershipClient
Inherited Members

Constructors

PaginatedMembershipClient(HttpClient, Uri)

Client for interacting with Membership collection resources.

public PaginatedMembershipClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of Membership resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MembershipCollectionResponse>

A task representing the asynchronous operation, containing a paginated list of Membership resources.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludePerson()

Include related Person resources in the response.

public MembershipClient IncludePerson()

Returns

MembershipClient

OrderByFirstName()

Sort response items by the FirstName attribute.

public MembershipClient OrderByFirstName()

Returns

MembershipClient

OrderByFirstNameDescending()

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

public MembershipClient OrderByFirstNameDescending()

Returns

MembershipClient

OrderByJoinedAt()

Sort response items by the JoinedAt attribute.

public MembershipClient OrderByJoinedAt()

Returns

MembershipClient

OrderByJoinedAtDescending()

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

public MembershipClient OrderByJoinedAtDescending()

Returns

MembershipClient

OrderByLastName()

Sort response items by the LastName attribute.

public MembershipClient OrderByLastName()

Returns

MembershipClient

OrderByLastNameDescending()

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

public MembershipClient OrderByLastNameDescending()

Returns

MembershipClient

OrderByRole()

Sort response items by the Role attribute.

public MembershipClient OrderByRole()

Returns

MembershipClient

OrderByRoleDescending()

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

public MembershipClient OrderByRoleDescending()

Returns

MembershipClient

PostAsync(Membership, CancellationToken)

Creates a new Membership resource asynchronously.

public Task<MembershipResponse> PostAsync(Membership resource, CancellationToken cancellationToken = default)

Parameters

resource Membership

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MembershipResponse>

A task representing the asynchronous operation, containing the created Membership resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<MembershipResource>, CancellationToken)

Creates a new Membership resource asynchronously.

public Task<MembershipResponse> PostAsync(JsonApiDocument<MembershipResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<MembershipResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<MembershipResponse>

A task representing the asynchronous operation, containing the created Membership resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereRole(string)

Query response items by the Role attribute.

public MembershipClient WhereRole(string value)

Parameters

value string

Returns

MembershipClient

WithId(string)

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

public MembershipClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

MembershipClient

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