Revish API
getReviews method
Retrieve up to 20 reviews from Revish.
URL: http://api.revish.com/getReviews
Arguments
- apikey (required)
- Your Revish API key which can be found on your profile
- 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 reviews matching your other criteria, default is 1.
- limit (optional)
- The maximum number of reviews to return. Maximum value is 20, default is 10.
- user (optional)
- Only return reviews for the user with this Revish username.
- tag (optional)
- Only return reviews of books which have been tagged with this tag.
- isbn (optional)
- Only return reviews of books with this ISBN.
- title (optional)
- Only return reviews of books whose titles contain this string.
- author (optional)
- Only return reviews of books written by authors whose names contain this string.
- publisher (optional)
- Only return reviews of books published by publishers whose names contain this string.
- sortby (optional)
- The order in which records are to be returned. Valid values are title, datedesc (default), dateasc, user or rating.
- recordtype (optional)
- Indicates whether to return a full review or a summary. Valid values are full (default) or summary.
- minrating (optional)
- Only return reviews with ratings equal to or higher than the specified value. Minimum value is 1, maximum is 5
- maxrating (optional)
- Only return reviews with ratings equal to or less than the specified value. Minimum value is 1, maximum is 5
getReviews 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/getReviews?apikey=yourapikey&isbn=0803731531
<?xml version="1.0" encoding="utf-8"?>
<response status="success">
<totalreviews>1</totalreviews>
<offset>1</offset>
<limit>10</limit>
<reviews>
<review>
<reviewid>63</reviewid>
<isbn>0803731531</isbn>
<booktitle>The Looking Glass Wars</booktitle>
<authors>
<author>Frank Beddor</author>
</authors>
<reviewer>Jaemi</reviewer>
<reviewtitle>An all-new "Alice"</reviewtitle>
<publisher>DIAL</publisher>
<reviewdate>1172340130</reviewdate>
<rating>5</rating>
<url>http://www.revish.com/reviews/0803731531/Jaemi/</url>
<smallcover>http://ec1.images-amazon.com/images/P/0803731531.01._SCTHUMBZZZ_.jpg</smallcover>
<mediumcover>http://ec1.images-amazon.com/images/P/0803731531.01._SCMZZZZZZZ_.jpg</mediumcover>
<links>
<link type="amazon.com">http://www.amazon.com/exec/obidos/ASIN/0803731531/theklaiwebdev-20/ref=nosim</link>
<link type="amazon.co.uk">http://www.amazon.co.uk/gp/associates/link-types/searchbox.html?mode=blended&tag=blether&keyword=The+Looking+Glass+Wars</link>
<link type="amazon.ca">http://www.amazon.ca/gp/associates/link-types/searchbox.html?mode=blended&tag=revish-20&keyword=The+Looking+Glass+Wars</link>
<link type="librarything">http://www.librarything.com/isbn/0803731531</link>
</links>
<reviewtext>
<![CDATA[<p>As Alyss Heart watches the goings-on in celebration of her seventh birthday, all she can think is it's boring…</p>]]>
</reviewtext>
</review>
</reviews>
</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/getReviews?apikey=yourapikey&limit=abc&name=abc
<response status="fail">
<errors>
<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>
</response>
