METHOD_PC_GetMyRooms
This method sends a request to BEMS to return a list of group discussions that the user is a manager of, a member of, following, has joined, or been invited to.
The following table describes the parameters that you can include in this method.
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
isMemberOf |
Boolean |
— |
This parameter specifies a list of group discussions that the user is a member of. By default, this value is false. |
|
isManagerOf |
Boolean |
— |
This parameter specifies a list of group discussions that the user is a manager of. By default, the value is false. |
|
isFollowing |
Boolean |
— |
This parameter specifies a list of group discussions that the user is following. By default, this value is false. |
|
hasJoined |
Boolean |
— |
This parameter specifies a list of group discussions that the user has joined and not left. By default, this value is false. |
|
isInvitedTo |
Boolean |
— |
This parameter specifies a list of group discussions that the user is invited to. By default, this value is false. |
Notification
The following table describes the parameters that BEMS returns and the notifications to send to the BlackBerry Connect app when users request a list of the group discussions that they are a manager of, a member of, following, joined, or invited to.
|
Parameter |
Type |
Description |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
rooms |
Room Array |
This parameter specifies the following information for each group discussion:
|
||||||||||||||||||
|
lastInvitationId |
Number |
This parameter specifies the ID of the group discussion for which the user received an invitation to join. |
Code example
The following code example sends a request to BEMS to return a list of group discussions that the user has joined and is a member of.
{
"method":"pc.GetMyRooms",
"params":
{
"isMemberOf":true,
"hasJoined":true
},
"id":"c5",
"jsonrpc":"2.0"
}
If the request is successful, BEMS sends the following response to the BlackBerry Connect app and processes the request.
{
"id":"c5",
"error":null,
"result":
{
"data":
{
"method":"pc.GetMyRooms",
"state":"PROCESSING"
}
},
"jsonrpc":"2.0"
}
If no error messages are returned, BEMS sends the following notification and returns the list of group discussions. In this example, the user is a member of the Retirement Discussion group discussion and includes 15 participants.
{
"id":"c5",
"sequence":1018820500000040,
"result":
{
"data":
{
"rooms":
[
{
"id":"ma-chan://gems.sw.rim.net/25ac15e7-9bff-4e78-9261-6e08aa43231e",
"name":"Retirement Discussion",
"description":"Discuss food options",
"numberOfParticpants":15,
"isJoined":true
}
],
"method":"pc.GetMyRooms",
"state":"COMPLETE"
}
},
"jsonrpc":"2.0"
}