public interface MembershipClient
Modifier and Type | Method and Description |
---|---|
void |
create(java.lang.String roomId,
java.lang.String personId,
java.lang.String personEmail,
boolean isModerator,
CompletionHandler<Membership> handler)
Adds a person to a room by person id; optionally making the person a moderator.
|
void |
delete(java.lang.String membershipId,
CompletionHandler<java.lang.Void> handler)
Deletes a membership by membership id.
|
void |
get(java.lang.String membershipId,
CompletionHandler<Membership> handler)
Retrieves the details for a membership by membership id.
|
void |
list(java.lang.String roomId,
java.lang.String personId,
java.lang.String personEmail,
int max,
CompletionHandler<java.util.List<Membership>> handler)
Lists all room memberships where the authenticated user belongs.
|
void |
update(java.lang.String membershipId,
boolean isModerator,
CompletionHandler<Membership> handler)
Updates the properties of a membership by membership id.
|
void list(@Nullable java.lang.String roomId, @Nullable java.lang.String personId, @Nullable java.lang.String personEmail, int max, @NonNull CompletionHandler<java.util.List<Membership>> handler)
roomId
- The identifier of the room where the membership belongs.personId
- The identifier of the person who has the memberships.personEmail
- The email address of the person who has the memberships.max
- The maximum number of items in the response.handler
- A closure to be executed once the request has finished.void create(@NonNull java.lang.String roomId, @Nullable java.lang.String personId, @Nullable java.lang.String personEmail, boolean isModerator, @NonNull CompletionHandler<Membership> handler)
roomId
- The identifier of the room where the person is to be added.personId
- The identifier of the person to be added.personEmail
- The email address of the person to be added.isModerator
- If true, make the person a moderator of the room. The default is false.handler
- A closure to be executed once the request has finished.void get(@NonNull java.lang.String membershipId, @NonNull CompletionHandler<Membership> handler)
membershipId
- The identifier of the membership.handler
- A closure to be executed once the request has finished.void update(@NonNull java.lang.String membershipId, boolean isModerator, @NonNull CompletionHandler<Membership> handler)
membershipId
- The identifier of the membership.isModerator
- If true, make the person a moderator of the room in this membership. The default is false.handler
- A closure to be executed once the request has finished.void delete(@NonNull java.lang.String membershipId, @NonNull CompletionHandler<java.lang.Void> handler)
membershipId
- The identifier of the membership.handler
- A closure to be executed once the request has finished.