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

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedMembershipClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

PaginatedMembershipClient

The current PaginatedMembershipClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public PaginatedMembershipClient ClearParameters()

Returns

PaginatedMembershipClient

The current PaginatedMembershipClient instance.

Filter(string)

Adds a filter query parameter to the request.

public PaginatedMembershipClient Filter(string filter)

Parameters

filter string

The filter criteria.

Returns

PaginatedMembershipClient

The current PaginatedMembershipClient instance.

Remarks

See Planning Center API documentation for details on supported filter values for this resource.

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

Offset(int)

Sets the item offset in the paginated response.

public PaginatedMembershipClient Offset(int count)

Parameters

count int

The number of items to skip.

Returns

PaginatedMembershipClient

The current PaginatedMembershipClient instance.

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

PerPage(int)

Sets the number of items to be returned per page in the paginated response.

public PaginatedMembershipClient PerPage(int count)

Parameters

count int

The number of items to be returned per page.

Returns

PaginatedMembershipClient

The current PaginatedMembershipClient instance.

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.