PeopleAggregator API: method peopleaggregator.editUserRelation

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

Method: peopleaggregator.editUserRelation

Modifies an existing relationship. (Requires authentication.)

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
Authentication token for the user creating the relation (see authentication documentation for more info).
Example: 8976234abcdef1234

login

Type: string
Login name for the user at the other end of the relationship.
Example: marccanter

relation

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

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if the relationship was successfully added, otherwise false.
Example: True

msg

Type: string
Success or failure detail.
Example: Relationship successfully deleted.

Example REST (XML) request

Request

POST /api/xml/peopleaggregator/editUserRelation HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 62

authToken=8976234abcdef1234&login=marccanter&relation=relation

Response

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

<response>
 <msg>Relationship successfully deleted.</msg>
 <success>true</success>
</response>

Example REST (JSON) request

Request

POST /api/json/peopleaggregator/editUserRelation HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 62

authToken=8976234abcdef1234&login=marccanter&relation=relation

Response

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

{"msg": "Relationship successfully deleted.", "success": true}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.editUserRelation</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>authToken</name>
      <value><string>8976234abcdef1234</string></value>
     </member>
     <member>
      <name>login</name>
      <value><string>marccanter</string></value>
     </member>
     <member>
      <name>relation</name>
      <value><string>relation</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

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

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