Skip Navigation

METHOD_PC_GetCategories

This method lists the categories that the group discussion is placed under. Group discussions can be placed only under one category. If a category is not specified, the instant messaging server randomly selects a category. 

Notification

The following table describes the notifications that 
BEMS
 might send to the 
BlackBerry Connect
 app after it processes the request.
parameter
Type
Description
categories
Category Array
This parameter specifies a list of categories. Each category includes the following information: 
Parameter
Type
Description
name
String
This parameter specifies the category name for the discussion group.
id
String
This parameter specifies the category ID of the discussion group.

Code example

The following example sends a request to 
BEMS
 to retrieve the categories for the group discussion.
{ "method":"pc.GetCategories", "params": {}, "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.GetCategories", "state":"PROCESSING" } }, "jsonrpc":"2.0", "background":false }
If no error messages are returned, 
BEMS
 sends the following notification, including the group discussion names and category to the 
BlackBerry Connect
 app and displays the information.
{ "id":"c5", "sequence":1018682300000006, "result": { "data": { "method":"pc.GetCategories", "Categories": [ { "name":"ITRestricted", "id":"ma-cat://gems.sw.rim.net/25ac15e7-9bff-4e78-9261-6e08aa43231e" }, { "name":"Public Use", "id":"ma-cat://gems.sw.rim.net/0772c8f8-0763-47a8-a98d-478cfb389443" } ], "method":"pc.GetCategories", "state":"COMPLETE" } }, "jsonrpc":"2.0" }