PeopleAggregator API: method peopleaggregator.getFriendAddresses

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

Method: peopleaggregator.getFriendAddresses

Get user friend list from Plaxo or WindowsLive services.

Arguments (see also Authentication)

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

serviceName

Type: string
Name of destination service: Plaxo or WindowsLive
Example: Plaxo

login

Type: string
User's authentication ID. (email address or Aol screen name)
Example: testuser@live.com or testuser21

password

Type: string
User's password.
Example: testuser123

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if user friend list readed sucessfuly. , false on failure.
Example: True

msg

Type: string
Human-readable status message
Example: Retrieved 8 contacts.

contacts

Type: array
List of user's contacts

Content of each item:

item

Type: hash

Attributes:

UserName

Type: string
Name retrieved from user's address book
Example: Jhon Smith

Email

Type: string
Email address retrieved from user's address book
Example: testuser@live.com!

Example REST (XML) request

Request

Response

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

<response>
 <msg>Retrieved 8 contacts.</msg>
 <success>true</success>
 <contacts>
  <item>
   <UserName>Jhon Smith</UserName>
   <Email>testuser@live.com!</Email>
  </item>
 </contacts>
</response>

Example REST (JSON) request

Request

Response

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

{"msg": "Retrieved 8 contacts.", "success": true, "contacts": [{"UserName": "Jhon Smith", "Email": "testuser@live.com!"}]}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.getFriendAddresses</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>password</name>
      <value><string>testuser123</string></value>
     </member>
     <member>
      <name>login</name>
      <value><string>testuser@live.com or testuser21</string></value>
     </member>
     <member>
      <name>serviceName</name>
      <value><string>Plaxo</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

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

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>msg</name>
      <value><string>Retrieved 8 contacts.</string></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
     <member>
      <name>contacts</name>
      <value><array><data>
       <value><struct>
        <member>
         <name>UserName</name>
         <value><string>Jhon Smith</string></value>
        </member>
        <member>
         <name>Email</name>
         <value><string>testuser@live.com!</string></value>
        </member>
       </struct></value>
      </data></array></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>