python-amazon-simple-product-api icon indicating copy to clipboard operation
python-amazon-simple-product-api copied to clipboard

Feature Request: Support for more Response Groups

Open ThomasProctor opened this issue 7 years ago • 5 comments

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 avatar Mar 28 '18 20:03 ThomasProctor

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

ThomasProctor avatar Mar 28 '18 23:03 ThomasProctor

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

yoavaviram avatar Mar 29 '18 16:03 yoavaviram

@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 avatar Mar 29 '18 16:03 ThomasProctor

@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.

ThomasProctor avatar Mar 29 '18 21:03 ThomasProctor

@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).

yoavaviram avatar Apr 09 '18 10:04 yoavaviram