开发者

When querying Amazon services with Zend (Zend_Service_Amazon), how to sort results by date?

I have begun using Zend with PHP to run product searches against Amazon. However, I can't figur开发者_开发知识库e out how to sort the products by date -- since I want to find the most recent products which match my keywords. The Amazon documentation doesn't have much information on how to sort results. Here's my code:

$amazon = new Zend_Service_Amazon('AMAZON_API_KEY', 'US', 'AMAZON_SECRET_KEY');
$results = $amazon->itemSearch(array('SearchIndex' => 'Books',
                                     'Keywords' => 'Cooking'
));
foreach ($results as $result) {
    echo $result->Title . '<br />';
}


Tried using the Sort parameter?

Parameter values may be found here - http://docs.amazonwebservices.com/AWSEcommerceService/2006-11-14/ApiReference/SortValuesArticle.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜