Hi guys,
For one project, i have to get reviews list by date(last 7 days, year to date, etc), I've check the API, but didn't find the function about this, is there any way to get the reviews list by date?
Now I just created the custom SQL to get the review list
Thanks.
Not at the moment although it wouldn't be a big job to implement it. We allow you to sort by date, so normally our customers do that and then page through the results.
Thanks, guys,
Which method I should use?
/**
* An array of review objects is returned for the given <code>productId</code>.
* <p>
* The <code>averageRating</code> attribute of the reviews is calculated and set by the method.
* <p>
* All reviews are retrieved, regardless of the language. <code>dataDesc</code> may be null. In
* this case, the number of retrieved reviews is limited to a default number, the reviews are
* ordered by the ReviewId and the offset is set to zero. However, by setting the attributes of
* <code>dataDesc</code>, the following functionality may be controlled :
* <ul>
* <li>The maximum number of Review objects returned.</li>
* <li>The offset which defaults to zero. This is useful when there are many Review objects, in
* order to return them using multiple calls to this method.</li>
* <li>Criteria on the custom attributes. If a custom attribute is set then only reviews with a
* matching custom attribute value are returned.</li>
* <li>The Reviews may be sorted by :
* <ul>
* <li>DataDescConstants.ORDER_BY_DATE_ADDED</li>
* <li>DataDescConstants.ORDER_BY_DATE_ADDED_DESCENDING</li>
* <li>DataDescConstants.ORDER_BY_DATE_ADDED_ASCENDING</li>
* <li>DataDescConstants.ORDER_BY_TIMES_READ</li>
* <li>DataDescConstants.ORDER_BY_TIMES_READ_DESCENDING</li>
* <li>DataDescConstants.ORDER_BY_TIMES_READ_ASCENDING</li>
* <li>DataDescConstants.ORDER_BY_RATING</li>
* <li>DataDescConstants.ORDER_BY_RATING_DESCENDING</li>
* <li>DataDescConstants.ORDER_BY_RATING_ASCENDING</li>
* </ul>
* </li>
* </ul>
*
* @param dataDesc
* Used to control the data offset, limit the number of items returned and set the
* sort order
* @param productId
* The numeric id of the product
* @return Return a Reviews object
* @throws KKException
*/
public ReviewsIf getReviewsPerProduct(DataDescriptorIf dataDesc, int productId)
throws KKException;