如何使用 bottlenose 创建远程亚马逊购物车
How to create a remote amazon shopping cart using bottlenose
我正在使用 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,我的电话似乎应该是这样的:
amazon.CartCreate(item.1.ASIN = item_id, item.1.Quantity = "1")
但是.1
。是无效语法。我该如何调用这个方法?
问得好,很抱歉没有在文档中包含这方面的示例。
只需使用关键字参数将值作为字典提供,如下所示:
params = {
'Item.1.ASIN': item_id,
'Item.1.Quantity': "1"
}
amazon.CartCreate(**params)
我正在使用 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,我的电话似乎应该是这样的:
amazon.CartCreate(item.1.ASIN = item_id, item.1.Quantity = "1")
但是.1
。是无效语法。我该如何调用这个方法?
问得好,很抱歉没有在文档中包含这方面的示例。
只需使用关键字参数将值作为字典提供,如下所示:
params = {
'Item.1.ASIN': item_id,
'Item.1.Quantity': "1"
}
amazon.CartCreate(**params)