2

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?

Dan Loewenherz
  • 10,879
  • 7
  • 50
  • 81
Meepo
  • 368
  • 4
  • 19

1 Answers1

1

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)
Dan Loewenherz
  • 10,879
  • 7
  • 50
  • 81