|
|
|
NavigationPersonal tools |
Exchange API
[edit] Calls[edit] CreateRequest URL: http://exchange.enlightenment.org/api/create
Additional parameters depend on which object is being created. See Objects below (Add a new comment to a theme with id 2) [edit] EditRequest URL: http://exchange.enlightenment.org/api/edit/{id}
Additional parameters depend on which object is being created. See Objects below (Update user with id 2, change name to 'new_username' and email to 'new_email@email.com') [edit] LoginRequest URL: http://exchange.enlightenment.org/api/login
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. [edit] ListRequest URL: http://exchange.enlightenment.org/api/list
Example: http://exchange.enlightenment.org/api/list?object=comment&theme_id=1 (Retrieves all comments for this theme) [edit] ReadRequest URL: http://exchange.enlightenment.org/api/read
Example: http://exchange.enlightenment.org/api/read?object=theme&id=1 (Retrieves the theme with ID 1) [edit] Objects[edit] applicationAn application (based on the EFL) Update Request Parameters:
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> [edit] commentA comment object provides a single that has been posted to a theme or a module by a user. Update Request Parameters:
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> [edit] moduleA module object describes a module for an application. Update Request Parameters:
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> [edit] themeA theme object corresponds to a theme available on the exchange. Update Request Parameters:
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> [edit] theme_groupA 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> [edit] userA user object gets a user's name and credentials Update Request Parameters:
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> |