class GroupRx
Reactive API of Group.
This class replicates some of the methods included in Group but using Rx types as return values instead of callbacks. It also exposes the event associated with one particular group using Rx observables.
val groupUpdated: Observable<GroupInfo>
Emits the current GroupInfo when the name or the participants are modified. |
fun add(participant: User): Completable
Adds a new participant to this group. Note: The user needs to be the group's owner. |
|
fun hasParticipant(participant: User): Single<Boolean>
Checks if a participant belongs to this group. |
|
fun leave(): Completable
Leaves this group. |
|
fun remove(participant: User): Completable
Removes a participant from this group. Note: The user needs to be the group's owner. |
|
fun removeAllParticipants(): Completable
Removes all participants from this group. Note: The user needs to be the group's owner. |
|
fun update(name: String): Completable
Updates the group name. Note: The user needs to be the group's owner. |