ZF2-293: Support multiple versions of AWS API

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

  • AWSEcommerceService
  • Amazon
  • Zend\Service\Amazon

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 '…->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 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:…

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.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.