Knowledge Base: users.collections.index

users.collections.index

Method Type: GET
Required Parameters: none
Optional Parameters: api_key, user_token

Displays the users collections.

Optional Parameters

api_key:        API token for your client.
user_token:     The user token for the owner of the collection.

Usage

// To retrieve all public collections.
http://api.emberapp.com/users/view/ac94/collections/index

// To get the other privacy levels also pass in the user token.
https://api.emberapp.com/users/view/ac94/collections/index?api_key={api_key}&user_token={user_token}

Response

Each collection is returned in an collection array with the following parameters.

collection:

name:               Name of the collection. [string]
slug:               URL slug and unique ID for the collection. [string]
description:        Description of the collection. [string]
created:            Date the collection was created. [int]
total_images:       Total images the user has added to the collection. [int]
privacy_level:      Current privacy level of the collection [string]

Example XML Response

<?xml version="1.0"?>
<response>
    <status code="0">OK</status>
    <api>api.user.collections</api>
    <collections>
        <collection>
            <name>1 2 3</name>
            <slug>1-2-3</slug>
            <description/>
            <created>1248307470</created>
            <privacy_level id="1">public</privacy_level>
        </collection>
        <collection>
            <name>Photos</name>
            <slug>photos</slug>
            <description/>
            <created>1248307470</created>
            <privacy_level id="2">secret</privacy_level>
        </collection>
    </collections>
</response>