User Tools

Site Tools


reviews:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reviews:api [2014/08/24 14:56]
jposeika [Output]
reviews:api [2016/11/25 14:34] (current)
jposeika [Input]
Line 115: Line 115:
 ==== Response code ==== ==== Response code ====
 |**Code** |**Code description** | |**Code** |**Code description** |
-|300|User logged in+|110|Response OK
-|310|Wrong email/​password| +|120|ISBN is empty|
-|315|User suspended| +
-|320|Empty password| +
-|330|Empty email|+
  
  
Line 521: Line 518:
 |account|Integer (10)|Yes| | |account|Integer (10)|Yes| |
 |isbn|Variable characters (20)|Yes|10- or 13-character ISBN or other item ID| |isbn|Variable characters (20)|Yes|10- or 13-character ISBN or other item ID|
-|order|Integer (1)|No|Order reviews by (values): 1 - by newest, 2 - oldest, 3 - highest-rated,​ 4 - lowest-rated,​ 5 - most-useful,​ 6 - most-useful by advanced method|+|order|Integer (1)|No|Order reviews by (values): 1 - by newest, 2 - oldest, 3 - highest-rated,​ 4 - lowest-rated,​ 5 - most-useful,​ 6 - most-useful by advanced method, 7 - library'​s own reviews on top|
 |length|Integer (5)|No|Output length. If not specified - full review will be output| |length|Integer (5)|No|Output length. If not specified - full review will be output|
 |page_size|Integer (5)|No|How many reviews per page should be output, default 10| |page_size|Integer (5)|No|How many reviews per page should be output, default 10|
Line 644: Line 641:
  
 |**Parameter** |**Type (size)** |**Mandatory** |**Description** | |**Parameter** |**Type (size)** |**Mandatory** |**Description** |
-|action|**getReviews** |Yes| |+|action|**getProReviews** |Yes| |
 |account|Integer (10)|Yes| | |account|Integer (10)|Yes| |
 |location|Variable characters (40)|Yes| |location|Variable characters (40)|Yes|
 |api_key|Variable characters (40)|Yes| |api_key|Variable characters (40)|Yes|
 |isbn|Variable characters (20)|Yes|10- or 13-character ISBN or other item ID| |isbn|Variable characters (20)|Yes|10- or 13-character ISBN or other item ID|
-|order|Integer (1)|No|Order reviews by (values): 1 - by newest, 2 - oldest, 3 - highest-rated,​ 4 - lowest-rated,​ 5 - most-useful,​ 6 - most-useful by advanced method| 
-|length|Integer (5)|No|Output length. If not specified - full review will be output| 
 |page_size|Integer (5)|No|How many reviews per page should be output, default 10| |page_size|Integer (5)|No|How many reviews per page should be output, default 10|
 |page_number|Integer (5)|No|Which output page to show, default 1| |page_number|Integer (5)|No|Which output page to show, default 1|
Line 688: Line 683:
 |review|review_url|Variable characters (40)|Always|Full URL of the review source| |review|review_url|Variable characters (40)|Always|Full URL of the review source|
 |review|review_country|Variable characters (2)|Always|Two-character code of the country of library where the review has been posted| |review|review_country|Variable characters (2)|Always|Two-character code of the country of library where the review has been posted|
-|review|review_date|Date & time (D, d M Y H:i:s)|Always|Date and time of review posted adjusted to library'​s timezone, e.g., Tue, 26 Aug 2008 20:44:42|+|review|review_date|Date & time (D, d M Y H:i:s)|No|Date and time of review posted adjusted to library'​s timezone, e.g., Tue, 26 Aug 2008 20:44:42|
 |review|review_title|Variable characters (50)|No|Title of review set by user| |review|review_title|Variable characters (50)|No|Title of review set by user|
-|review|review_text|Text (unlimited)|Always|Text of review|English - others ​to follow [[reviews:​languages|here]].| +|review|review_text|Text (unlimited)|Always|Text of review, limited ​to 600 symbols + must add review_url as "Read full review"|
-|review|similar_item_isbn|Variable characters (20)|If review for similar item|10- or 13-character ISBN of the item, or other code **IF review written for (other) similar item, not this particular ISBN/code**|+
 |**Block //review// ends**||||| |**Block //review// ends**|||||
 |**Block //results// ends**||||| |**Block //results// ends**|||||
Line 1308: Line 1302:
  
 |**Parameter** |**Type (size)** |**Mandatory** | |**Parameter** |**Type (size)** |**Mandatory** |
-|action|**ratedItems** |Yes|+|action|**ramingReview** |Yes|
 |account|Integer (10)|Yes| |account|Integer (10)|Yes|
 |location|Variable characters (40)|Yes| |location|Variable characters (40)|Yes|
Line 2201: Line 2195:
 |**Code** |**Code description** | |**Code** |**Code description** |
 |1001|Response OK| |1001|Response OK|
 +|60|Session invalid, expired or empty|
 +
 +===== ratingUserCheck:​ checks whether user has rated this item already =====
 +Checks whether user has rated particular items.
 +
 +==== Input ====
 +  * URL for XML output: https://​secure.chilifresh.com/​api/​reviews/​
 +  * URL for JSON output: https://​secure.chilifresh.com/​api/​reviews/​json/​
 +  * Method: GET
 +  * Parameters:
 +
 +|**Parameter** |**Type (size)** |**Mandatory** |
 +|action|**ratingUserCheck** |Yes|
 +|account|Integer (10)|Yes|
 +|isbn|Varchar (20)|Yes|
 +|session_id|Session ID|Yes|
 +|location|Variable characters (40)|Yes|
 +|api_key|Variable characters (40)|Yes|
 +
 +==== Output ====
 +  * Format: XML, JSON
 +  * Blocks and elements:
 +
 +**XML output example:**
 +<​code>​
 +<?xml version="​1.0"?>​
 +<​response>​
 + <​response_code>​100</​response_code>​
 + <​response_description>​Response OK</​response_description>​
 + <​rating_count>​1</​rating_count>​
 + <​response_time>​Wed,​ 26 Aug 2009 13:​20:​05</​response_time>​
 + <​rating>​4</​rating>​
 +</​response>​
 +</​code>​
 +
 +==== Response code ====
 +|**Code** |**Code description** |
 +|100|Response OK|
 +|120|ISBN is empty|
 |60|Session invalid, expired or empty| |60|Session invalid, expired or empty|
  
reviews/api.1408910208.txt.gz · Last modified: 2014/08/24 14:56 by jposeika