Differences

This shows you the differences between two versions of the page.

librarious:api [2009/06/20 00:33]
mauayan
librarious:api [2010/05/18 16:14] (current)
mauayan added link to lib.rario.us
Line 1: Line 1:
====== lib.rario.us API ====== ====== lib.rario.us API ======
-**Please note**: none of this is live yet, I'm just getting some of the documentation in place in preparation for the launch of lib.rario.us<html>&sup2;</html>.+Please note: **this is very much in beta**, so let me know if you have any problems or requests. 
 + 
 +This is the API for http://lib.rario.us.
These should all be RESTful. These should all be RESTful.
Line 7: Line 9:
Some methods will require [[:librarious:api#authentication|Authentication]]. Some methods will require [[:librarious:api#authentication|Authentication]].
-The API is *very* much in alpha, so let me know if you have any problems or requests.+ 
 +===== JSON ===== 
 +Data will return in JSON by default.  
 + 
 +If you pass a "callback" param, the data will be passed to a function using the callback value for the function name.
===== Using cURL ===== ===== Using cURL =====
Line 18: Line 24:
===== API Methods ===== ===== API Methods =====
Many of these methods will return a <html><code>HTTP 204 No Content</code></html> on failure. Many of these methods will return a <html><code>HTTP 204 No Content</code></html> on failure.
 +
 +Methods that destroy or edit data require a POST.
 +
 +
==== User Methods ==== ==== User Methods ====
Line 30: Line 40:
| id            | integer - a user's id                          | | id            | integer - a user's id                          |
| screenname    | string - a user's name                         | | screenname    | string - a user's name                         |
 +| format        | either 'xml' or 'json' - defaults to 'json'    |
 +
 +
 +
 +==== Media Methods ====
 +Methods for interacting with libraries.
 +
 +=== Media Index ===
 +<code>lib.rario.us/api/media</code>
 +
 +==Requires==
 +
 +^ Parameter     ^ Type                                           ^
 +| owner         | string - a username on lib.rario.us            |
 +| type          | string - 'books', 'dvds', 'music', or 'games'  |
 +| tag           | string - separate multiples tags with a "+"    |
 +| page          | integer - for page number                      |
| format        | either 'xml' or 'json' - defaults to 'json'    | | format        | either 'xml' or 'json' - defaults to 'json'    |
Line 38: Line 65:
=== Item Show === === Item Show ===
<code>lib.rario.us/api/item/show</code> <code>lib.rario.us/api/item/show</code>
 +
 +==Requires==
 +  * an item's <html><code>id</code></html>
^ Parameter     ^ Type                                           ^ ^ Parameter     ^ Type                                           ^
Line 45: Line 75:
=== Item Add === === Item Add ===
<code>lib.rario.us/api/item/add</code> <code>lib.rario.us/api/item/add</code>
 +==Requires==
 +  * a title's <html><code>ASIN</code></html>
 +
=== Item Delete === === Item Delete ===
-Requires: +== Requires ==
  * authentication   * authentication
  * a POST   * a POST
  * an item's <html><code>id</code></html>   * an item's <html><code>id</code></html>
-Returns:+== Returns ==
<html><code>true</code></html> on success or a <html><code>HTTP 204 No Content</code></html> <html><code>true</code></html> on success or a <html><code>HTTP 204 No Content</code></html>
Line 70: Line 103:
| screenname    | string - a user's name                         | | screenname    | string - a user's name                         |
| format        | either 'xml' or 'json' - defaults to 'json'    | | format        | either 'xml' or 'json' - defaults to 'json'    |
 +
 +
 +
Line 78: Line 114:
=== Title Show === === Title Show ===
<code>lib.rario.us/api/title/show</code> <code>lib.rario.us/api/title/show</code>
 +
 +^ Parameter     ^ Type                                           ^
 +| id            | integer - a  title's id                        |
 +| asin          | string - a title's amazon id                   |
 +| upc           | string - a title's UPC                         |
 +| ean           | string - a title's EAN                         |
 +| isbn          | string - a title's isbn                        |
 +| format        | either 'xml' or 'json' - defaults to 'json'    |
 +
 +
 +
Line 85: Line 132:
=== Amazon Search === === Amazon Search ===
<code>lib.rario.us/api/amazon/search</code> <code>lib.rario.us/api/amazon/search</code>
- 

Personal Tools