PeopleAggregator API: method peopleaggregator.getUserRelation

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

Method: peopleaggregator.getUserRelation

Gets details of an existing relationship, or returns a relation_not_exist error if no such relationship exists.

Arguments (see also Authentication)

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

login

Type: string
Login name for the user who 'owns' the relationship.
Example: myelin

relation_login

Type: string
Login name for the other user in the relationship.
Example: marccanter

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if the relationship exists, otherwise false.
Example: True

msg

Type: string
Success or failure detail.
Example: Relationship exists.

relation

Type: enum
The type of relationship.
Allowed values: havent met, acquaintance, relation, good relation, best relation
Example: relation

Example REST (XML) request

Request

Response

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

<response>
 <msg>Relationship exists.</msg>
 <relation>relation</relation>
 <success>true</success>
</response>

Example REST (JSON) request

Request

Response

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

{"msg": "Relationship exists.", "relation": "relation", "success": true}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.getUserRelation</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>login</name>
      <value><string>myelin</string></value>
     </member>
     <member>
      <name>relation_login</name>
      <value><string>marccanter</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

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

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>msg</name>
      <value><string>Relationship exists.</string></value>
     </member>
     <member>
      <name>relation</name>
      <value><string>relation</string></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>