API Method /users/relations/list

Lists all relations associated with a user.

Arguments

authentication
This method requires the usual authentication arguments.
id string
The user's ID. If not specified, the authenticated user by default.
members boolean
Option to show members of relations.

Example Request

Here's an example request URL:

http://api.evdb.com/rest/users/relations/list?...&id=chris&members=true

Output Parameters

Output from this function is an XML block with the following constructs:
relations
A list of relations associated with the user. Composed of that user's chosen "friends", "family", and "contacts". It also shows the "rights" given to the user by other user (rights could be friends, family, and/or contacts).:
friends, family, contacts
id string
The group id associated with that user's friends, family, or contacts.
name string
The group name.
creator string
The group creator. Will be null if group does not contain any associations.
member_count integer
The total of the group's members.
members (optional; specify members=true in request parameters)
member
username string
The username of the member of the relationship.
rights
The rights given to the selected user by others. Each "right" is a "group" composed of the following:
id string
The group id associated the other user's friends, family, or contacts.
relation string
The relation name. (Friends, family, or contacts.)
user string
The userid of the other user.

Example XML Response

To explain this, the user "chris" is both friends and contacts with 3 other users: "dmarkham", "frink", and "sdultimate". There are no users that have been tagged as family by chris. The user "sdultimate" has tagged "chris" as friends, family, and contacts.

<?xml version="1.0" encoding="UTF-8"?>

<relations>
<friends id="G0-001-000000431-5">
<name>friends</name>
<creator_id>1776</creator_id>
<creator>chris</creator>
<member_count>3</member_count>
<members>
<member>
<username>dmarkham</username>
</member>
<member>
<username>frink</username>
</member>
<member>
<username>sdultimate</username>
</member>
</members>
</friends>
<family id="G0-001-000000440-3">
<name>family</name>
<creator_id>1776</creator_id>
<creator></creator>
<member_count>0</member_count>
<members></members>
</family>
<contacts id="G0-001-000000432-4">
<name>contacts</name>
<creator_id>1776</creator_id>
<creator>chris</creator>
<member_count>3</member_count>
<members>
<member>
<username>dmarkham</username>
</member>
<member>
<username>frink</username>
</member>
<member>
<username>sdultimate</username>
</member>
</members>
</contacts>
<rights>
<group id="G0-001-000000018-8">
<relation>contacts</relation>
<user_id>495</user_id>
<user>sdultimate</user>
</group>
<group id="G0-001-000000019-7">
<relation>friends</relation>
<user_id>495</user_id>
<user>sdultimate</user>
</group>
<group id="G0-001-000000020-3">
<relation>family</relation>
<user_id>495</user_id>
<user>sdultimate</user>
</group>
<group id="G0-001-000000431-5">
<relation>friends</relation>
<user_id>1776</user_id>
<user>chris</user>
</group>
<group id="G0-001-000000432-4">
<relation>contacts</relation>
<user_id>1776</user_id>
<user>chris</user>
</group>
<group id="G0-001-000000440-3">
<relation>family</relation>
<user_id>1776</user_id>
<user>chris</user>
</group>
</rights>
</relations>

Error Codes

This method may return these errors in an error document:

Authentication error
The specified user was not found or provided invalid credentials.
 
Not found
The user id was not found.
Missing parameter
A mandatory field was not provided.