yoavaviram / python-amazon-simple-product-api

A simple Python wrapper for the Amazon.com Product Advertising API ⛺
Apache License 2.0
817 stars 212 forks source link

Feature Request: Support for more Response Groups #133

Open ThomasProctor opened 6 years ago

ThomasProctor commented 6 years ago

Right now, there is very limited support for the "AlternateVersions" and "Variations" response groups. The API supports many response groups, and I would imagine that this package poorly supports many others as well. Based on a quick skim of the code, it seems like only "Large", and "BrowseNodeInfo" are explicitly supported. Response groups that happen to have elements that are shared by these two (ex "Medium" and "Small") will have limited support as well.

An alternate versions search will return an AmazonProduct object with None for almost all attributes and methods except for to_string(). I have been resorting to processing the xml myself using an lxml.etree.

This might be out of the scope of this project ("simple" is in the name), but it would be awfully nice to have this ability. Looking physical books is basically impossible using titles because Amazon always returns the kindle e-book if available, so looking at the "AlternativeVersions" is a necessity.

For AltenateVersions at least, returning a list of dictionaries of title, binding, ASIN values would be the logical thing. I imagine that "Variations" will be similar. I'm not sure if this is best done via a keyword argument (ie ResponseGroup="AltenateVersions") or a bunch of methods (ie api.search_alternate_versions()) though.

ThomasProctor commented 6 years ago

This should be closed as it's a repeat of #60.

yoavaviram commented 6 years ago

@ThomasProctor, would you be interested in attempting the re-factor / becoming a core committer?

ThomasProctor commented 6 years ago

@yoavaviram, Hmm... I don't think I really have time to jump into the refactor now, and I can't imagine having it in the next 2-3 years.

ThomasProctor commented 6 years ago

@yoavaviram I would be up for doing some of the maintenance duties. Most of the pull requests you have backed up make some fairly good contributions, and I'd be willing to clean them up and write the tests for them.

yoavaviram commented 6 years ago

@ThomasProctor i've added as a collaborator, feel free to jump in. I hope to have some time in the next weeks to fix the failing tests (and maybe find a better mechanism to prevent it breaking in the future).