Issue Type: Improvement Created: 2012-05-09T12:20:00.000+0000 Last Updated: 2012-08-21T19:42:41.000+0000 Status: Resolved Fix version(s): Reporter: Adam Lundrigan (adamlundrigan) Assignee: John Kelly (postalservice14) Tags: - Zend\Service
Related issues: - ZF-5434
[Cloned from ZF-5434, originally posted by [~baxter]]
I think it would be a good idea to be able to specify the version you'd like to use. An example would be:
$amazon = new Zend\Service\Amazon('****','CA'); $amazon->setVersion('2008-08-19'); $results = $amazon->itemSearch(array( 'SearchIndex' => 'Jewelry', 'Keywords' => 'gold necklace', 'ResponseGroup' => 'Small,ItemAttributes,Images,SalesRank,Reviews,EditorialReview,Similarities,ListmaniaLists' ));
From taking a quick look through the only update I can see to the class would be the following:
adding the public function setVersion which would set $this->version in _prepareOptions check to see if this->version is set and if so update the query to include the Version parameter in _checkErrors update the namespace to 'http://webservices.amazon.com/AWSECommerceService/…->version
quoted from the amazon best practises:
"Amazon Associates Web Service makes frequent releases. Each release either adds functionality or increases the accuracy, speed, and stability of Amazon Associates Web Service. Most releases do both. Check http://aws.amazon.com/resources frequently for documentation about the latest release.
To use the latest version of the API, you must include the version parameter in your requests. Otherwise, Amazon Associates Web Service uses the default API version, which is from 2005-10-05"
Posted by John Kelly (postalservice14) on 2012-08-20T15:36:11.000+0000
Pull Request Sent: https://github.com/zendframework/…
Posted by Maks 3w (maks3w) on 2012-08-21T19:42:41.000+0000
Patch merged, thank you
Have you found an issue?
See the Overview section for more details.