group.list

List all your groups. Returns an array named "groups" with all your groups.

Request Parameters

(none)

Response Parameters

group_idint
Id for group.
nameString
Name of group.
descriptionString
Description of group.
languageString
The language the group works on.
date_createdString

Date when the context was created in ISO 8601 format. (YYYY-MM-DDTHH:mm:ssz)

date_updatedString

Date when the context was last updated (e.g. text added/deleted) in ISO 8601 format. (YYYY-MM-DDTHH:mm:ssz)

Code Examples

JSON

//Request
{
  "method":"group.list", 
  "params":{},
  "id":0
}

//Response
{ 
 "id":0,
 "result":{
    "groups":[
      {
        "group_id":13,
        "name":"My Tech Group",
        "language":"en",
        "description":"Group based on tech articles.",
        "date_created":"2011-03-30T10:31:33z",
        "date_updated":"2011-07-15T23:08:54z"
      },
      {
        "group_id":14,
        "name":"My Sport Group",
        "language":"en",
        "description":"Group based on sport articles.",
        "date_created":"2011-01-30T11:36:43z",
        "date_updated":"2011-05-15T25:18:14z"
      }
    ]
  }
}

Java


// You need to have a ready-to-use client to use the other methods
SaploClient client = new SaploClient("YOUR_API_KEY", "YOUR_SECRET_KEY");

// Create a SaploGroupManager to work with groups
SaploGroupManager groupMgr = new SaploGroupManager(client);

// Get a list of all your groups in a List
List<SaploGroup> groupList = groupMgr.list();

// Print them out
for(SaploGroup group : groupList)
    System.out.println(group.toString());

PHP

$client = new SaploAPI("YOUR API KEY", "YOUR SECRET KEY");

try {
    $result = $client->group->list();
} catch(SaploException $e) {
    echo '(' . $e->getCode() . ') ' . $e->getMessage();
}
   
var_dump($result);

Python


client = SaploJSONClient("YOUR API KEY", "YOUR SECRET KEY")

group_list = client.group.list()

print "Listing all groups:", group_list

Matlab

response = saploRequest('group.list')