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/07/10 01:49]
jposeika [Response code]
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 627: Line 624:
  
  
 +</​code>​
 +
 +==== Response code ====
 +|**Code** |**Code description** |
 +|110|Response OK|
 +|120|ISBN is empty|
 +
 +
 +===== getProReviews:​ retrieving professional reviews for an item =====
 +This function allows retrieving professional reviews information on item by ISBNs (or other item ID)
 +==== Input ====
 +  * URL of XML output: https://​secure.chilifresh.com/​api/​reviews/​
 +  * URL of JSON output: https://​secure.chilifresh.com/​api/​reviews/​json/​
 +  * Method: GET
 +  * Parameters:
 +
 +|**Parameter** |**Type (size)** |**Mandatory** |**Description** |
 +|action|**getProReviews** |Yes| |
 +|account|Integer (10)|Yes| |
 +|location|Variable characters (40)|Yes|
 +|api_key|Variable characters (40)|Yes|
 +|isbn|Variable characters (20)|Yes|10- or 13-character ISBN or other item ID|
 +|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|
 +
 +  ​
 +**XML Retrieval example:**
 +<​code>​
 +https://​secure.chilifresh.com/​api/​reviews/?​isbn=0889652015&​account=20&​action=getProReviews&​api_key=1j132ioj12oij3
 +</​code>​
 +
 +**JSON Retrieval example:**
 +<​code>​
 +https://​secure.chilifresh.com/​api/​reviews/​json/?​isbn=0889652015&​account=20&​action=getProReviews&​api_key=1j132ioj12oij3
 +</​code>​
 +
 +==== Output ====
 +  * Format: XML, JSON
 +  * Blocks and elements:
 +
 +|**Block** |**Element** |**Type (size)**|**Exists** |**Description** |
 +|**Block //​response//​ starts**|||Always| |
 +|response|response_code|Integer (3)|Always|Response code from the table below|
 +|response|response_description|Text (255)|Always|Brief description of response code|
 +|response|response_time|Date&​time (D, d M Y H:​i:​s)|Always|Example:​ Wed, 26 Aug 2009 10:34:32|
 +|**Block //item// starts**|||If response code "​110"​| |
 +|item|isbn|Variable characters (20)|Always|Contains ISBN or other ID of an item|
 +|item|page_size|Integer (5)|Always|Number of reviews per page output|
 +|item|page_number|Integer (5)|Always|Current output page number|
 +|item|page_review_count|Integer (5)|Always|Number of reviews in current page|
 +|item|total_review_count|Integer (5)|Always|Total number of reviews for the item|
 +|**Block //item// ends**|||||
 +|**Block //results// starts**|||if //​item_count//​ larger than 0| |
 +|**Block //review// starts**|||if //​item_count//​ larger than 0| |
 +|review|review_id|Variable characters (10)|Always|ChiliFresh ID of the review|
 +|review|author_nickname|Variable characters (50)|Always|Nickname of the user posting the nickname|
 +|review|review_source|Variable characters (40)|Always|Full English name of 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_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_text|Text (unlimited)|Always|Text of review, limited to 600 symbols + must add review_url as "Read full review"​|
 +|**Block //review// ends**|||||
 +|**Block //results// ends**|||||
 +|**Block //​response//​ ends**|||||
 +
 +
 +
 +**XML output example:**
 +<​code>​
 +<?xml version="​1.0"?>​
 +TO BE ADDED
 </​code>​ </​code>​
  
Line 1233: 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 2126: 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