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.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val groupAdded: Observable<Group>

Emits a Group instance when a new group is created.

Link copied to clipboard
val groupDeleted: Observable<String>

Emits a group identifier when that group is removed.

Link copied to clipboard
val groupUpdated: Observable<Group>

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

Functions

Link copied to clipboard
fun create(groupName: String): Single<Group>

Creates a new Group.

Link copied to clipboard
fun delete(group: Group): Completable

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

Link copied to clipboard
fun getGroup(groupId: String): Single<Group>

Gets the group identified by a given groupId.

Link copied to clipboard
fun getGroups(userIsParticipant: Boolean): Single<List<Group>>

Gets the user's groups.

Link copied to clipboard
fun leaveAllGroups(): Completable

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