Class PaginatedMembershipClient
- Namespace
- Crews.PlanningCenter.Api.Groups.V2023_07_10
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Membership collection resources.
public class PaginatedMembershipClient : PaginatedResourceClient<Membership, MembershipResource, MembershipCollectionResponse, MembershipResponse>
- Inheritance
-
PaginatedResourceClient<Membership, MembershipResource, MembershipCollectionResponse, MembershipResponse>PaginatedMembershipClient
- Inherited Members
Constructors
PaginatedMembershipClient(HttpClient, Uri)
Client for interacting with Membership collection resources.
public PaginatedMembershipClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
GetAsync(CancellationToken)
Fetches a paginated list of Membership resources asynchronously.
public Task<MembershipCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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
OrderByFirstName()
Sort response items by the FirstName attribute.
public MembershipClient OrderByFirstName()
Returns
OrderByFirstNameDescending()
Sort response items by the FirstName attribute. Use reverse order.
public MembershipClient OrderByFirstNameDescending()
Returns
OrderByJoinedAt()
Sort response items by the JoinedAt attribute.
public MembershipClient OrderByJoinedAt()
Returns
OrderByJoinedAtDescending()
Sort response items by the JoinedAt attribute. Use reverse order.
public MembershipClient OrderByJoinedAtDescending()
Returns
OrderByLastName()
Sort response items by the LastName attribute.
public MembershipClient OrderByLastName()
Returns
OrderByLastNameDescending()
Sort response items by the LastName attribute. Use reverse order.
public MembershipClient OrderByLastNameDescending()
Returns
OrderByRole()
Sort response items by the Role attribute.
public MembershipClient OrderByRole()
Returns
OrderByRoleDescending()
Sort response items by the Role attribute. Use reverse order.
public MembershipClient OrderByRoleDescending()
Returns
PostAsync(Membership, CancellationToken)
Creates a new Membership resource asynchronously.
public Task<MembershipResponse> PostAsync(Membership resource, CancellationToken cancellationToken = default)
Parameters
resourceMembershipThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<MembershipResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA 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
valuestring
Returns
WithId(string)
Creates a new instance of a Membership client for a specific resource ID.
public MembershipClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- MembershipClient
A new instance of the resource client for the specified resource ID.