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

Group

class Group

A group instance.

This class allows performing actions over this specific group like adding, expelling or checking its participants.

Properties

id

val id: String

name

val name: String

participants

val participants: List<User>

rx

val rx: GroupRx

Access to the reactive API of the group.

Functions

add

fun add(participant: User, onCompletion: (SippoResourceError?) -> Unit): Unit

Adds a new participant to this group. Note: The user needs to be the group's owner.

hasParticipant

fun hasParticipant(participant: User, onCompletion: (Either<Boolean, SippoResourceError>) -> Unit): Unit

Checks if a participant belongs to this group.

leave

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

Leaves this group.

remove

fun remove(participant: User, onCompletion: (SippoResourceError?) -> Unit): Unit

Removes a participant from this group. Note: The user needs to be the group's owner.

removeAllParticipants

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

Removes all participants from this group. Note: The user needs to be the group's owner.

update

fun update(name: String, onCompletion: (SippoResourceError?) -> Unit): Unit

Updates the group name. Note: The user needs to be the group's owner.