Revish API
getReadingList method
Retrieve a user's reading list from Revish.
URL: http://api.revish.com/getReadingList
Arguments
- apikey (required)
- Your Revish API key which can be found on your profile
- user (required)
- The user whose reading list to retrieve
- format (optional)
- The format you want the results returned in. Valid values are js, php or xml (default).
- offset (optional)
- The number of the first record to return. Minimum value is 1, maximum value is the total number of books in the reading list, default is 1.
- limit (optional)
- The maximum number of books to return. Maximum value is 20, default is 10.
- sortby (optional)
- The order in which records are to be returned. Valid values are title, datedesc (default), dateasc.
getReadingList response
The root node is response, which has a single attribute "status". A response status of "success" indicates a successful call to the method and one or more records returned.
Example successful response
Request: http://api.revish.com/getReadingList?apikey=yourapikey&user=danchamp&limit=1
<?xml version="1.0" encoding="utf-8"?>
<revish:response status="success">
<totalbooks>3</totalbooks>
<offset>1</offset>
<limit>1</limit>
<user>danchamp</user>
<books>
<book>
<isbn>074754624X</isbn>
<booktitle>Harry Potter and the Goblet of Fire</booktitle>
<authors>
<author>J.K. Rowling</author>
</authors>
<publisher>Bloomsbury Publishing PLC</publisher>
<started>2007-09-23</started>
<url>http://www.revish.com/books/074754624X/</url>
<smallcover>http://ec1.images-amazon.com/images/I/01MEB03G5NL.jpg</smallcover>
<mediumcover>http://ec1.images-amazon.com/images/I/216MSN6N60L.jpg</mediumcover>
<links>
<link type="amazon.com">http://www.amazon.com/gp/associates.....>
<link type="amazon.co.uk">http://www.amazon.co.uk/gp/associates.....>
<link type="amazon.ca">http://www.amazon.ca/gp/associates.....>
<link type="librarything">http://www.librarything.com/isbn/074754624X</link>
</links>
</book>
</books>
</revish:response>
A response status of "fail" indicates an unsuccessful call to the method, and the response will contain details of the error(s) encountered.
Example failed response
Request: http://api.revish.com/getReadingList?apikey=yourapikey&limit=abc&name=abc
<revish:response status="fail">
<errors>
<error>
<code>MissingParameter</code>
<message>Required parameter user missing.</message>
</error>
<error>
<code>InvalidParameterValue</code>
<message>abc is not a valid value for parameter limit.</message>
</error>
<error>
<code>UnknownParameter</code>
<message>name is not a valid parameter name.</message>
</error>
</errors>
</revish:response>
