Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

ThomasProctor
Copy link

Adds support for another response group. Part of the long slog to add support for #60.

I modeled this on how we support the "Images" response group. I'm not sure if it's the right way to do it, but I figured I should be consistent with the current API.

Here's some example usage:

In [11]: lookup_result = amazon.lookup(ItemId="1491914254", ResponseGroup='AlternateVersions')

In [12]: lookup_result.alternate_versions
Out[12]: 
[{'asin': '9352136047',
  'binding': 'Paperback',
  'title': "Deep Learning: A Practitioner's Approach"},
 {'asin': 'B074D5YF1D',
  'binding': 'Kindle Edition',
  'title': "Deep Learning: A Practitioner's Approach"}]

@ThomasProctor
Copy link
Author

ThomasProctor commented Mar 28, 2018

Some tests fail, as it looks like some of the info on products they query has changed. I opened an issue #134. All product-specific information should probably be removed from the tests. Instead, tests should just do type checks and check that the product information is present, and ignore what the specific value of that product information is.

@ThomasProctor
Copy link
Author

ThomasProctor commented Mar 29, 2018

Sorry about not opening a separate branch - I fixed an error in how browse_node_lookup handles invalid BrowseNodeIds. It turns out that the IsValid parameter does not, in fact, tell if the browse node id is valid. Instead, I had it check to see if any errors are made by the request. This was the bug highlighted by Issue #113.

Some pep8 white space changes in the test file got put in as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.