# 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

Companion
Link copied to clipboard
object Companion

## Properties

groupAdded
Link copied to clipboard
val groupAdded: Observable<Group>

Emits a Group instance when a new group is created.

groupDeleted
Link copied to clipboard
val groupDeleted: Observable<String>

Emits a group identifier when that group is removed.

groupUpdated
Link copied to clipboard
val groupUpdated: Observable<Group>

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

## Functions

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

Creates a new Group.

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

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

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

Gets the group identified by a given groupId.

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

Gets the user's groups.

leaveAllGroups
Link copied to clipboard
fun leaveAllGroups(): Completable

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