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
Last revision Both sides next revision
reviews:api [2014/10/12 15:34]
jposeika [Input]
reviews:api [2016/11/25 14:33]
jposeika
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 686: 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+|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 itemor 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 1306: 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 2199: 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|ChiliFresh session - retrieved from userRegister,​ userLogin or userCreateSession call|Only if user_id is not specified|
 +|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.txt · Last modified: 2016/11/25 14:34 by jposeika