How to create a remote amazon shopping cart using bottlenose

260 views Asked by At

I'm using bottlenose for a program in Python that involves creating a shopping cart. The README isn't clear as to the parameters for the CartCreate method. After looking through the Amazon documentation, it seems as if my call should look like this:

amazon.CartCreate(item.1.ASIN = item_id, item.1.Quantity = "1")

But the .1. is invalid syntax. How am I supposed to call this method?

1

There are 1 answers

0
Dan Loewenherz On BEST ANSWER

Great question, and apologies for not including an example for this in the documentation.

Just use a keyword argument to provide the values as a dictionary, like so:

params = {
    'Item.1.ASIN': item_id,
    'Item.1.Quantity': "1"
}

amazon.CartCreate(**params)