Support
Contribute
Contact
Tracker
Navigation
Personal tools
 

Exchange API

Contents

Calls

Create

Request URL: http://exchange.enlightenment.org/api/create

Parameter Description
object Object Type. Please see Objects below
login_id ID of the User to authenticate as. (See the Login Call)
api_key API Key of the User to authenticate as. (See the Login Call)

Additional parameters depend on which object is being created. See Objects below

Example: http://exchange.enlightenment.org/api/create?login_id=1&api_key=123456789&object=comment&comment=Great&theme_id=2

(Add a new comment to a theme with id 2)

Edit

Request URL: http://exchange.enlightenment.org/api/edit/{id}

Parameter Description
object Object Type. Please see Objects below
login_id ID of the User to authenticate as. (See the Login Call)
api_key API Key of the User to authenticate as. (See the Login Call)

Additional parameters depend on which object is being created. See Objects below

Example: http://exchange.enlightenment.org/api/edit/2?login_id=1&api_key=123456789&object=user&name=new_username&email=new_email@email.com

(Update user with id 2, change name to 'new_username' and email to 'new_email@email.com')

Login

Request URL: http://exchange.enlightenment.org/api/login

Parameter Description
name Username
password Password

Example: http://exchange.enlightenment.org/api/login?name=exchange&password=exchange

(Login with a username of 'exchange' and password of 'exchange')

Response:

<rsp stat="ok">
  <user>
    <id>1</id>
    <name>exchange</name>
    <email>exchange@enlightenment.org</email>
    <role>Admin</role>
    <api_key>c0b83a976cf3a6a135573238bb319119</api_key>
    <created_at>2008-07-06 20:47:22</created_at>
    <updated_at>2008-07-06 20:47:23</updated_at>
  </user>
</rsp>

The id and api_key fields can be used for subsequent calls to create / update.

List

Request URL: http://exchange.enlightenment.org/api/list

Parameter Description
object Object Type. Please see Objects below
user_id User ID to filter the results by. Available for objects of type theme, comment and module
user_name User Name to filter the results by. Available for objects of type theme, comment and module
theme_group_title Title of the theme group to filter by. Available for objects of type theme
theme_group_name Name of the edje group to filter by. Available for objects of type theme
application_id ID Of the application to filter by. Available for objects of type comment, module and theme
module_id ID Of the module to filter by. Available for objects of type comment and theme
theme_id ID Of the theme to filter by. Available for objects of type theme_group, comment
limit Limit the number of results. Useful for pagination
offset Offset to start at. Useful for pagination
rss If this parameter is present, the response will be in RSS format

Example: http://exchange.enlightenment.org/api/list?object=comment&theme_id=1

(Retrieves all comments for this theme)

Read

Request URL: http://exchange.enlightenment.org/api/read

Parameter Description
object Object Type. Please see Objects below
id ID of this object type
name name of this object type. Used for application, module, theme and user

Example: http://exchange.enlightenment.org/api/read?object=theme&id=1

(Retrieves the theme with ID 1)

Objects

application

An application (based on the EFL)

Update Request Parameters:

Parameter Description
name Name of the module
description Description text
source_url URL of where this module can be retrieved from
screenshot Module screenshot. Uploaded as multipart

XML Response for Read:

<application>
  <id>4</id>
  <name>Enlightenment</name>
  <description>The Enlightenment Window Manager</description>
  <url>http://www.enlightenment.org</url>
  <thumbnail>http://exchange.enlightenment.org/files/application/4/smallthumb.png</thumbnail>
  <screenshot>http://exchange.enlightenment.org/files/application/4/screenshot.png</screenshot>
  <user_id>4</user_id>
  <created_at>2008-07-12 15:49:28</created_at>
  <updated_at>2008-07-12 15:50:34</updated_at>
</application>

comment

A comment object provides a single that has been posted to a theme or a module by a user.

Update Request Parameters:

Parameter Description
comment The comment text
theme_id ID of the theme
module_id ID of the module

XML Response for Read:

<comment>
  <id>2</id>
  <message>This is a comment</message>
  <theme_id>1</theme_id>
  <user_id>2</user_id>
  <created_at>2000-01-01 12:00:00</created_at>
  <updated_at>2000-01-01 12:00:00</updated_at>
</comment>

module

A module object describes a module for an application.

Update Request Parameters:

Parameter Description
name Name of the module
description Description text
application_id ID of the Application this module is part of
source_url URL of where this module can be retrieved from
screenshot Module screenshot. Uploaded as multipart

XML Response for Read:

<module>
  <id>3</id>
  <name>Module Name</name>
  <description>Module Description</description>
  <url>http://exchange.enlightenment.org/module/get/3</url>
  <thumbnail>http://exchange.enlightenment.org/files/module/3/smallthumb.png</thumbnail>
  <screenshot>http://exchange.enlightenment.org/files/module/3/screenshot.png</screenshot>
  <application_id>4</application_id>
  <user_id>2</user_id>
  <created_at>2000-01-01 12:00:00</created_at>
  <updated_at>2000-01-01 12:00:00</updated_at>
</module>

theme

A theme object corresponds to a theme available on the exchange.

Update Request Parameters:

Parameter Description
name Name of the theme
description Description text
file Theme file. Uploaded as multipart
screenshot Theme screenshot. Uploaded as multipart

XML Response for Read:

<theme>
  <id>1</id>
  <name>Theme Name</name>
  <description>Long Theme Description</description>
  <url>http://exchange.enlightenment.org/theme/get/1</url>
  <thumbnail>http://exchange.enlightenment.org/files/theme/1/smallthumb.png</thumbnail>
  <screenshot>http://exchange.enlightenment.org/files/theme/1/screenshot.png</screenshot>
  <user_id>2</user_id>
  <created_at>2000-01-01 12:00:00</created_at>
  <updated_at>2000-01-01 12:00:00</updated_at>
</theme>

theme_group

A theme_group object describes an edje group. This is used for determining which themes provide for which parts of E.

XML Response for Read:

<theme_group>
  <id>1</id>
  <name>e/desktop/background</name>
  <title>Wallpaper</title>
  <known>1</known>
  <created_at>2000-01-01 12:00:00</created_at>
  <updated_at>2000-01-01 12:00:00</updated_at>
</theme_group>

user

A user object gets a user's name and credentials

Update Request Parameters:

Parameter Description
name Username
email Email Address
password New Password

XML Response for Read:

<user>
  <id>2</id>
  <name>username</name>
  <email>username@domain.com</email>
  <role>Admin</role>
  <created_at>2000-01-01 12:00:00</created_at>
  <updated_at>2000-01-01 12:00:00</updated_at>
</user>