ZF-5434: Zend_Service_Amazon uses api version 2005-10-05

Issue Type: Improvement Created: 2009-01-08T13:14:22.000+0000 Last Updated: 2012-05-09T12:20:59.000+0000 Status: Closed Fix version(s): Reporter: Jason Brumwell (baxter) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Service_Amazon

Related issues: - ZF2-293



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 Benjamin Eberlei (beberlei) on 2009-01-09T03:12:25.000+0000

The question is, does the result-sets change between the different versions?

Posted by clintonne (clintonne) on 2009-08-25T06:58:04.000+0000

The problem I'm facing with this is that some ResponseGroups did not exist back in 2005. So using the version "2005-10-05" doesn't work with the newer responsegroups. The responsegroup "RelatedItems" for instance doesn't work right now. Even if the results sets do not differ, In my opinion it's not a good practice to have variables hard-coded anyways and this could easily be fixed.

Posted by Thomas Weidner (thomas) on 2010-03-21T10:24:53.000+0000

Reassigned to component maintainer

Posted by Brady Emerson (meman1188) on 2010-07-10T15:16:04.000+0000

I have also run into the same issue. I modified my code to use version 2007-10-29 and everything seems to be fine with the drop in replacement. As clintonne says, some ResponseGroups did not exist in 2005 which limits the amount of information we can retrieve from the service. Having the ability to control which version of the API we would like to use would be very helpful.

Posted by Ota Mares (ota) on 2011-11-03T15:51:54.000+0000

This has become an issue with the latest API update. More details about the update can be found here…

Besides that amazon already removed various information from the current api version, it will become invalid in a few months. So having control over the api version would allow us to use new features without the need of a zend update.

Posted by Matthew Weier O'Phinney (matthew) on 2011-11-03T16:07:13.000+0000

Assigning to Enrico

Posted by Alex (2ndak) on 2012-03-25T17:29:17.000+0000

Any movement on this? Here is an example why we should push this forward - In this case, users can just set the version in the code instead of messing around the framework.

Posted by Adam Lundrigan (adamlundrigan) on 2012-05-09T12:15:21.000+0000

ZF-12046 will be resolved in ZF 1.12.0

As for changing Zend_Service_Amazon to allow selecting the API version, that will not be added to ZFv1 at this late stage in it's lifecycle. I will clone this ticket into the Zend Framework 2 JIRA project so that it remains on the radar for ZFv2.

Posted by Adam Lundrigan (adamlundrigan) on 2012-05-09T12:20:12.000+0000

See ZF2-293

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.