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

GroupsRx

class GroupsRx

Reactive API of Groups.

This class replicates some of the methods included in Groups but using Rx types as return values instead of callbacks. It also exposes the same group events using Rx observables.

Properties

groupAdded

val groupAdded: Observable<Group>

Emits a Group instance when a new group is created.

groupDeleted

val groupDeleted: Observable<String>

Emits a group identifier when that group is removed.

groupUpdated

val groupUpdated: Observable<Group>

Emits a Group when the name or the participants of a group are modified.

Functions

create

fun create(groupName: String): Single<Group>

Creates a new Group.

delete

fun delete(group: Group): Completable

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

getGroup

fun getGroup(groupId: String): Single<Group>

Gets the group identified by a given groupId.

getGroups

fun getGroups(userIsParticipant: Boolean): Single<List<Group>>

Gets the user's groups.

leaveAllGroups

fun leaveAllGroups(): Completable

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