Revish API
getReadingHistory method
Retrieve a user's reading history from Revish.
URL: http://api.revish.com/getReadingHistory
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, completeddesc (default), completedasc, startedasc, starteddesc.
getReadingHistory 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/getReadingHistory?apikey=yourapikey&user=danchamp&limit=1
<?xml version="1.0" encoding="utf-8"?>
<revish:response status="success">
<totalbooks>34</totalbooks>
<offset>1</offset>
<limit>1</limit>
<user>danchamp</user>
<books>
<book>
<isbn>0747546290</isbn>
<booktitle>Harry Potter and the Prisoner of Azkaban</booktitle>
<authors>
<author>J.K. Rowling</author>
</authors>
<publisher>Bloomsbury Publishing PLC</publisher>
<started>2007-09-13</started>
<completed>2007-09-23</completed>
<comment>The last thin Harry Potter</comment>
<url>http://www.revish.com/books/0747546290/</url>
<smallcover>http://ec1.images-amazon.com/images/I/11dohYaBIJL.jpg</smallcover>
<mediumcover>http://ec1.images-amazon.com/images/I/21dPEgS7oWL.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/0747546290</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/getReadingHistory?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>
