Knowledge Base: users.collections.view
users.collections.view
Method Type: GET
Required Parameters: slug
Optional Parameters: api_key, user_token, page
Displays the images in a users collection.
Required Parameters
slug: Unique slug for the collection.
Optional Parameters
api_key: API token for your client.
user_token: The user token for the owner of the collection.
page: URL segments/GET parameter containing the page number.
Usage
// To public and secret collection.
http://api.emberapp.com/users/view/ac94/collections/view/{slug}
// To get the other privacy levels also pass in the user token.
https://api.emberapp.com/users/view/ac94/collections/view/{slug}?api_key={api_key}&user_token={user_token}
// To get the second page of images.
http://api.emberapp.com/users/view/ac94/collections/view/{slug}/page/2
// Using GET param.
http://api.emberapp.com/users/view/ac94/collections/view/{slug}?page=2
Response
The collection is returned as well as the images array.
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]
image item:
name: Name of the image: [string]
token: Unique identifier for the image. [string]
shared_token: Token for the parent image if it exists. [string]
description: Description of the image. [string]
rating: Rating of the image 0-5. [int]
url: The original url of the image (if web snap). [string]
date_taken: Unix timestamp the image was created. [int]
slug: The slug used by the image on the site unique to the owner. [string]
views: The number of times the image has been viewed. [int]
created: Unix Timestamp the image was added. [int]
user: User information. [array]
file: File information for the medium image. [array]
permalink: URL to the image page on Ember [string]
user item:
username: Users username and unique identifier. [string]
fullname: Users fullname. [string]
bio: Users bio. [string]
url: Users homepage. [string]
total_images: Total images the user has uploaded to Ember. [int]
avatar: Array containing the medium avatar information. [array]
file item:
size: Size flag of the image (sq, t, s, m, l, o). [string]
width: Width in px of the image. [int]
height: Height in px of the image. [int]
filesize: Size in bytes of the file. [int]
src: Url to the file for the image. [string]
Example XML Response
<?xml version="1.0"?>
<response>
<status code="0">OK</status>
<api>api.user.collections.view</api>
<collection>
<name>Websites</name>
<slug>websites</slug>
<description/>
<created>1248307470</created>
<privacy_level id="1">public</privacy_level>
</collection>
<images>
<image>
<name>LittleSnapper 1.0 DMG</name>
<token>19820388464a5c8d942d95b</token>
<shared_token>19820388464a5c8d942d95b</shared_token>
<description/>
<rating>0</rating>
<url/>
<date_taken>1229010590</date_taken>
<slug>littlesnapper-1-0-dmg</slug>
<views>27</views>
<created>1247579540</created>
<user>
<username>ac94</username>
<fullname>Aron</fullname>
<bio/>
<url/>
<total_images>79</total_images>
</user>
<file>
<size>m</size>
<width>600</width>
<height>404</height>
<filesize>226554</filesize>
<src>http://emberapp.com/ac94/images/littlesnapper-1-0-dmg/sizes/m.png</src>
</file>
<permalink>http://emberapp.com/ac94/images/littlesnapper-1-0-dmg</permalink>
</image>
<image>
<name>Capo</name>
<token>161227232849ef3a02b491e</token>
<shared_token>161227232849ef3a02b491e</shared_token>
<description/>
<rating>5</rating>
<url>http://supermegaultragroovy.com/products/Capo/</url>
<date_taken>1240414601</date_taken>
<slug>capo</slug>
<views>285</views>
<created>1240414722</created>
<user>
<username>ac94</username>
<fullname>Aron</fullname>
<bio/>
<url/>
<total_images>79</total_images>
</user>
<file>
<size>m</size>
<width>600</width>
<height>569</height>
<filesize>424753</filesize>
<src>http://emberapp.com/ac94/images/capo/sizes/m.png</src>
</file>
<permalink>http://emberapp.com/ac94/images/capo</permalink>
</image>
</images>
</response>