我正在使用 Zend Service Amazon 2.0 使用关键字搜索书籍。现在,代码正在搜索所有书籍,而不考虑子类别。我怎样才能让它只搜索大学教科书,如以下链接所示?
http://www.amazon.co.uk/University-Textbooks/b/ref=amb_link_162814547_4?ie=UTF8&node=511914031&pf_rd_m=A3P5ROKL5A1OLE&pf_rd_s=left-1&pf_rd_r=0HCH1765DMFTPPTJ0QRG&pf_rd_t=101&pf_rd_p=361137207&pf_rd_i=266239
这是我的代码:
public function amazonsearch($keywords) {
set_include_path(get_include_path() . PATH_SEPARATOR . 'application/libraries/Amazon');
require_once 'Zend/Loader/StandardAutoloader.php';
$autoloader = new Zend\Loader\StandardAutoloader(array(
'namespaces' => array(
'Zend' => dirname(__FILE__) . '/Zend',
'ZendRest' => dirname(__FILE__) . '/ZendRest',
'ZendService' => dirname(__FILE__) . '/ZendService',
),
'fallback_autoloader' => true));
$autoloader->register();
$tag = ''; // replace with your Amazon app ID
$appId = ''; // replace w/ your access key from https://portal.aws.amazon.com/gp/aws/securityCredentials
$secretKey = '';
$query = new ZendService\Amazon\Query($appId, 'UK', $secretKey);
$query->Category('Books')->Keywords($keywords)->AssociateTag($tag)->Page(10);
$data['result'] = $query->search();
/*var_dump( $data['result']);*/
$this->load->view('development/amazonsearch',$data);
}