PeopleAggregator API: method peopleaggregator.getFolders

Arguments | Return value | REST (XML) example | REST (JSON) example | XML-RPC example

Method: peopleaggregator.getFolders

List a user's mail folders.

Arguments (see also Authentication)

If calling by XML-RPC, note that this method takes a single struct as input, with the following keys:

authToken

Type: string
An authentication token
Example: as9d867f234o7asdf:928734982734987234:298374982734987234

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if the mailbox list request was processed successfully, or false if an error occurred
Example: True

folders

Type: array

Content of each item:

item

Type: hash

Attributes:

name

Type: string
Folder name
Example: Inbox

Example REST (XML) request

Request

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 254

<response>
 <folders>
  <item>
   <name>Inbox</name>
  </item>
 </folders>
 <success>true</success>
</response>

Example REST (JSON) request

Request

Response

HTTP/1.1 200 OK
Content-Type: application/x-javascript
Content-Length: 49

{"folders": [{"name": "Inbox"}], "success": true}

Example XML-RPC call

Request

POST /api/xmlrpc HTTP/1.1
Content-Type: text/xml
Content-Length: 754

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.getFolders</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>authToken</name>
      <value><string>as9d867f234o7asdf:928734982734987234:298374982734987234</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 1453

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>folders</name>
      <value><array><data>
       <value><struct>
        <member>
         <name>name</name>
         <value><string>Inbox</string></value>
        </member>
       </struct></value>
      </data></array></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>