MembershipClient

interface MembershipClient

Client wrapper for Membership of a Space related APIs

Since

0.1

Functions

Link copied to clipboard
abstract fun create(    spaceId: String,     personId: String?,     personEmail: String?,     isModerator: Boolean = false,     handler: CompletionHandler<Membership>)

Adds a person to a space by person id; optionally making the person a moderator.

Link copied to clipboard
abstract fun delete(membershipId: String, handler: CompletionHandler<Void>)

Deletes a membership by membership id. It removes the person from the space where the membership belongs.

Link copied to clipboard
abstract fun get(membershipId: String, handler: CompletionHandler<Membership>)

Fetches the membership details based on the membership id

Link copied to clipboard
abstract fun list(    spaceId: String?,     personId: String?,     personEmail: String?,     max: Int?,     handler: CompletionHandler<List<Membership>>)

Fetches the list of membership based on the provided params

Link copied to clipboard
abstract fun listWithReadStatus(spaceId: String, handler: CompletionHandler<List<MembershipReadStatus>>)

Returns a list of memberships with details about the lastSeenId for each user so that application can tell which message was the last message was read by each user.

Link copied to clipboard
abstract fun setMembershipObserver(observer: MembershipObserver?)

Sets a MembershipObserver in this client.

Link copied to clipboard
abstract fun update(    membershipId: String,     isModerator: Boolean,     handler: CompletionHandler<Membership>)

Updates the properties of a membership by membership id.