Groups

class Groups

The group service.

This class allows performing group related actions such as creating a new group, retrieving available groups or deleting an exiting one. It also allows adding a listener to receive general group events (@see GroupsListener).

Properties

Link copied to clipboard

Access to the reactive API of the service.

Functions

Link copied to clipboard

Adds a listener to receive group events.

Link copied to clipboard
fun create(groupName: String, onCompletion: (Either<Group, SippoResourceError>) -> Unit)

Creates a new group.

Link copied to clipboard
fun delete(group: Group, onCompletion: (SippoResourceError?) -> Unit)

Deletes the specified group. Note: The user needs to be the group's owner.

Link copied to clipboard
fun getGroup(groupId: String, onCompletion: (Either<Group, SippoResourceError>) -> Unit)

Gets the group identified by a given groupId.

Link copied to clipboard
fun getGroups(userIsParticipant: Boolean, onCompletion: (Either<List<Group>, SippoResourceError>) -> Unit)

Gets the user's groups.

Link copied to clipboard
fun leaveAllGroups(onCompletion: (SippoResourceError?) -> Unit)

Leaves all the groups where the current user is present as participant.

Link copied to clipboard

Removes the specified listener.