Class GroupClient
- Namespace
- Crews.PlanningCenter.Api.Groups.V2018_08_01
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the Group resource.
public class GroupClient : SingletonResourceClient<Group, GroupResource, GroupResponse>
- Inheritance
-
GroupClient
- Inherited Members
Constructors
GroupClient(HttpClient, Uri)
Client for interacting with the Group resource.
public GroupClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Applications
Associated Applications.
public PaginatedGroupApplicationClient Applications { get; }
Property Value
Campuses
Associated Campuses.
public PaginatedCampusClient Campuses { get; }
Property Value
Enrollment
Associated Enrollment.
public EnrollmentClient Enrollment { get; }
Property Value
Events
Associated Events.
public PaginatedEventClient Events { get; }
Property Value
GroupType
Associated GroupType.
public GroupTypeClient GroupType { get; }
Property Value
Location
Associated Location.
public LocationClient Location { get; }
Property Value
Memberships
Associated Memberships.
public PaginatedMembershipClient Memberships { get; }
Property Value
MyMembership
Associated MyMembership.
public MembershipClient MyMembership { get; }
Property Value
People
Associated People.
public PaginatedPersonClient People { get; }
Property Value
Resources
Associated Resources.
public PaginatedResourceClient Resources { get; }
Property Value
Tags
Associated Tags.
public PaginatedTagClient Tags { get; }
Property Value
Methods
AssignCampusesAsync(CancellationToken)
Planning Center does not provide a description for this action.
This action can be used to assign campuses to a group.
All campuses will be replaced so the full data set must be sent.
public Task AssignCampusesAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
DisableChatAsync(CancellationToken)
Planning Center does not provide a description for this action.
Disables chat for the given group. This will hide chat from the group.
You must confirm your intention with a confirm attribute to allow this action to succeed.
public Task DisableChatAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
DuplicateAsync(CancellationToken)
Planning Center does not provide a description for this action.
Starts a background job to duplicate a group along with selected settings.
Accepts an optional name for the new group. If not provided, the name will
default to the original group's name with " (Copy)" appended (e.g., "My Group (Copy)").
The new group name must be unique.
Requires a fields array specifying which aspects of the group to duplicate,
such as members, leaders, and settings.
Optionally accepts a group_type_id to assign a different group type to the
new group. If omitted, the original group's type will be used.
public Task DuplicateAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
EnableChatAsync(CancellationToken)
Planning Center does not provide a description for this action.
Enables chat for the given group. Enabling chat will make the names of each member visible to
other group members. Chat cannot be enabled for a group if the member list is confidential.
You must confirm your intention with a confirm attribute to allow this action to succeed.
public Task EnableChatAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
GetAsync(CancellationToken)
Fetches the Group resource asynchronously.
public Task<GroupResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<GroupResponse>
A task representing the asynchronous operation, containing the Group resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeEnrollment()
Include related Enrollment resources in the response.
public GroupClient IncludeEnrollment()
Returns
IncludeGroupType()
Include related GroupType resources in the response.
public GroupClient IncludeGroupType()
Returns
IncludeLocation()
Include related Location resources in the response.
public GroupClient IncludeLocation()
Returns
PatchAsync(Group, CancellationToken)
Updates an existing Group resource asynchronously.
public Task<GroupResponse> PatchAsync(Group resource, CancellationToken cancellationToken = default)
Parameters
resourceGroupThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<GroupResponse>
A task representing the asynchronous operation, containing the updated Group resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<GroupResource>, CancellationToken)
Updates an existing Group resource asynchronously.
public Task<GroupResponse> PatchAsync(JsonApiDocument<GroupResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<GroupResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<GroupResponse>
A task representing the asynchronous operation, containing the updated Group resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.