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).
val rx: GroupsRx
Access to the reactive API of the service. |
fun addListener(listener: GroupsListener): Unit
Adds a listener to receive group events. |
|
fun create(groupName: String, onCompletion: (Either<Group, SippoResourceError>) -> Unit): Unit
Creates a new group. |
|
fun delete(group: Group, onCompletion: (SippoResourceError?) -> Unit): Unit
Deletes the specified group. Note: The user needs to be the group's owner. |
|
fun getGroup(groupId: String, onCompletion: (Either<Group, SippoResourceError>) -> Unit): Unit
Gets the group identified by a given groupId. |
|
fun getGroups(userIsParticipant: Boolean, onCompletion: (Either<List<Group>, SippoResourceError>) -> Unit): Unit
Gets the user's groups. |
|
fun leaveAllGroups(onCompletion: (SippoResourceError?) -> Unit): Unit
Leaves all the groups where the current user is present as participant. |
|
fun removeListener(listener: GroupsListener): Unit
Removes the specified listener. |