sippo-sdk / com.quobis.sippo.sipposdk.group / Groups

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

rx

val rx: GroupsRx

Access to the reactive API of the service.

Functions

addListener

fun addListener(listener: GroupsListener): Unit

Adds a listener to receive group events.

create

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

Creates a new group.

delete

fun delete(group: Group, onCompletion: (SippoResourceError?) -> Unit): Unit

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

getGroup

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

Gets the group identified by a given groupId.

getGroups

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

Gets the user's groups.

leaveAllGroups

fun leaveAllGroups(onCompletion: (SippoResourceError?) -> Unit): Unit

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

removeListener

fun removeListener(listener: GroupsListener): Unit

Removes the specified listener.