Revish API

getToBeReadList method

Retrieve a user's to-be-read list from Revish.

URL: http://api.revish.com/getToBeReadList

Arguments

apikey (required)
Your Revish API key which can be found on your profile
user (required)
The user whose TBR list you wish 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 (default), addeddesc, addedasc.

getToBeReadList 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/getToBeReadList?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>0545010225</isbn>
      <booktitle>Harry Potter and the Deathly Hallows</booktitle>
      <authors>
        <author>J.K. Rowling</author>
      </authors>
      <publisher>Arthur A. Levine Books</publisher>
      <added>2007-08-02</added>
      <comment>The last Harry Potter</comment>
      <url>http://www.revish.com/books/0545010225/</url>
      <smallcover>http://g-ec2.images-amazon.com/images/I/11pr9kKLpQL.jpg</smallcover>
      <mediumcover>http://g-ec2.images-amazon.com/images/I/21W4m4R4WKL.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/0545010225</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/getToBeReadList?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>