Class PaginatedRuleClient
- Namespace
- Crews.PlanningCenter.Api.People.V2025_07_02
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Rule collection resources.
public class PaginatedRuleClient : PaginatedResourceClient<Rule, RuleResource, RuleCollectionResponse, RuleResponse>
- Inheritance
-
PaginatedRuleClient
- Inherited Members
Constructors
PaginatedRuleClient(HttpClient, Uri)
Client for interacting with Rule collection resources.
public PaginatedRuleClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedRuleClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedRuleClient
The current PaginatedRuleClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedRuleClient ClearParameters()
Returns
- PaginatedRuleClient
The current PaginatedRuleClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedRuleClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedRuleClient
The current PaginatedRuleClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
GetAsync(CancellationToken)
Fetches a paginated list of Rule resources asynchronously.
public Task<RuleCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<RuleCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Rule resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeConditions()
Include related Conditions resources in the response.
public RuleClient IncludeConditions()
Returns
Offset(int)
Sets the item offset in the paginated response.
public PaginatedRuleClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedRuleClient
The current PaginatedRuleClient instance.
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public RuleClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public RuleClient OrderByCreatedAtDescending()
Returns
OrderBySubset()
Sort response items by the Subset attribute.
public RuleClient OrderBySubset()
Returns
OrderBySubsetDescending()
Sort response items by the Subset attribute. Use reverse order.
public RuleClient OrderBySubsetDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public RuleClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public RuleClient OrderByUpdatedAtDescending()
Returns
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedRuleClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedRuleClient
The current PaginatedRuleClient instance.
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public RuleClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereSubset(string)
Query response items by the Subset attribute.
public RuleClient WhereSubset(string value)
Parameters
valuestring
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public RuleClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a Rule client for a specific resource ID.
public RuleClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- RuleClient
A new instance of the resource client for the specified resource ID.