PeopleAggregator API: method peopleaggregator.getUserList

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

Method: peopleaggregator.getUserList

Returns the list of users on the current site. (Do we want this to be public? Right now

Arguments (see also Authentication)

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

page

Type: int
The page you want to receive.
Example: 1
Minimum: 1
Default: 1

resultsPerPage

Type: int
The number of users you want to receive per page.
Example: 100
Minimum: 10
Maximum: 100
Default: 100

profileImageSize

Type: enum
Dimensions of profile images to return (for detailLevel 'pics' or above)
Allowed values: none, 50x50, 127x135, full
Example: 50x50
Default: none

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
True on success, false on failure.
Example: True

page

Type: int
The current result page.
Example: 1

totalUsers

Type: int
The total number of users available.
Example: 234

totalPages

Type: int
The total number of pages available.
Example: 3

resultsPerPage

Type: int
The max number of users shown per page.
Example: 100

users

Type: array
A page of users.

Content of each item:

item

Type: hash

Attributes:

id

Type: string
The user's ID.
Example: user:123

login

Type: string
The user's login name.
Example: gaurav

image

Type: hash
Relation's profile image (returned for detailLevel 'pics' or above).

Attributes:

url

Type: string
URL of relation's profile image
Example: http://example.org/peepagg/files/12345_image.jpg

width

Type: int
Width of relation's profile image
Example: 420

height

Type: int
Height of relation's profile image
Example: 960

Example REST (XML) request

Request

Response

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

<response>
 <users>
  <item>
   <login>gaurav</login>
   <id>user:123</id>
   <image>
    <url>http://example.org/peepagg/files/12345_image.jpg</url>
    <width>420</width>
    <height>960</height>
   </image>
  </item>
 </users>
 <success>true</success>
 <resultsPerPage>100</resultsPerPage>
 <totalPages>3</totalPages>
 <totalUsers>234</totalUsers>
 <page>1</page>
</response>

Example REST (JSON) request

Request

Response

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

{"users": [{"login": "gaurav", "id": "user:123", "image": {"url": "http://example.org/peepagg/files/12345_image.jpg", "width": 420, "height": 960}}], "success": true, "resultsPerPage": 100, "totalPages": 3, "totalUsers": 234, "page": 1}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.getUserList</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>profileImageSize</name>
      <value><string>50x50</string></value>
     </member>
     <member>
      <name>resultsPerPage</name>
      <value><int>100</int></value>
     </member>
     <member>
      <name>page</name>
      <value><int>1</int></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

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

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>users</name>
      <value><array><data>
       <value><struct>
        <member>
         <name>login</name>
         <value><string>gaurav</string></value>
        </member>
        <member>
         <name>id</name>
         <value><string>user:123</string></value>
        </member>
        <member>
         <name>image</name>
         <value><struct>
          <member>
           <name>url</name>
           <value><string>http://example.org/peepagg/files/12345_image.jpg</string></value>
          </member>
          <member>
           <name>width</name>
           <value><int>420</int></value>
          </member>
          <member>
           <name>height</name>
           <value><int>960</int></value>
          </member>
         </struct></value>
        </member>
       </struct></value>
      </data></array></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
     <member>
      <name>resultsPerPage</name>
      <value><int>100</int></value>
     </member>
     <member>
      <name>totalPages</name>
      <value><int>3</int></value>
     </member>
     <member>
      <name>totalUsers</name>
      <value><int>234</int></value>
     </member>
     <member>
      <name>page</name>
      <value><int>1</int></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>