Differences
This shows you the differences between two versions of the page.
librarious:api [2009/06/19 20:24] 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 ====== | ||
- | ===== Overview ===== | ||
- | These should all be REST based. | + | 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. | ||
Some methods will require [[:librarious:api#authentication|Authentication]]. | Some methods will require [[:librarious:api#authentication|Authentication]]. | ||
- | The API is *very* much in beta, 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 15: | Line 22: | ||
- | ===== User Methods ===== | + | ===== API Methods ===== |
- | ==== Show ==== | + | Many of these methods will return a <html><code>HTTP 204 No Content</code></html> on failure. |
- | api/user/show | + | |
+ | Methods that destroy or edit data require a POST. | ||
+ | |||
+ | |||
+ | |||
+ | ==== User Methods ==== | ||
+ | Methods for interacting with the user data. | ||
+ | |||
+ | === User Show === | ||
+ | <code>lib.rario.us/api/user/show</code> | ||
This method requires either <html><code>id</code></html> or <html><code>screenname</code></html> and returns JSON (by default) or XML using the <html><code>format</code></html> parameter. | This method requires either <html><code>id</code></html> or <html><code>screenname</code></html> and returns JSON (by default) or XML using the <html><code>format</code></html> parameter. | ||
- | ^ Parameter ^ Type ^ | + | ^ Parameter ^ Type ^ |
- | | 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' | | + | | 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' | | ||
+ | |||
+ | |||
+ | ==== Item Methods ==== | ||
+ | Methods for interacting with item data. | ||
+ | |||
+ | === Item Show === | ||
+ | <code>lib.rario.us/api/item/show</code> | ||
+ | |||
+ | ==Requires== | ||
+ | * an item's <html><code>id</code></html> | ||
+ | |||
+ | ^ Parameter ^ Type ^ | ||
+ | | id | integer - an items id | | ||
+ | | format | either 'xml' or 'json' - defaults to 'json' | | ||
+ | |||
+ | === Item Add === | ||
+ | <code>lib.rario.us/api/item/add</code> | ||
+ | ==Requires== | ||
+ | * a title's <html><code>ASIN</code></html> | ||
+ | |||
+ | |||
+ | === Item Delete === | ||
+ | == Requires == | ||
+ | * authentication | ||
+ | * a POST | ||
+ | * an item's <html><code>id</code></html> | ||
+ | == Returns == | ||
+ | <html><code>true</code></html> on success or a <html><code>HTTP 204 No Content</code></html> | ||
+ | |||
+ | <code>lib.rario.us/api/item/delete</code> | ||
+ | |||
+ | ^ Parameter ^ Type ^ | ||
+ | | id | integer - an items id | | ||
+ | |||
+ | |||
+ | ==== Tag Methods ==== | ||
+ | Methods for interacting with tags | ||
+ | |||
+ | === Tag Show === | ||
+ | <code>lib.rario.us/api/tags/show</code> | ||
+ | |||
+ | ^ Parameter ^ Type ^ | ||
+ | | user_id | integer - a user's id | | ||
+ | | screenname | string - a user's name | | ||
+ | | format | either 'xml' or 'json' - defaults to 'json' | | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Title Methods ==== | ||
+ | Methods for interacting with titles | ||
+ | |||
+ | === Title Show === | ||
+ | <code>lib.rario.us/api/title/show</code> | ||
- | ===== Item Methods ===== | + | ^ 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' | | ||
- | ==== Show ==== | ||
- | api/item/show | ||
- | ==== Add ==== | ||
- | api/item/add | ||
- | ==== Delete ==== | ||
- | api/item/delete | ||
- | ===== Title Methods ===== | ||
- | ===== Amazon Methods ===== | + | ==== Amazon Methods ==== |
+ | Methods for interacting with lib.rario.us's amazon methods | ||
- | ==== Search ==== | + | === Amazon Search === |
- | api/amazon/search | + | <code>lib.rario.us/api/amazon/search</code> |
You are here: start » librarious » api