Botoは、ほとんどのAmazon MWS APIにアクセスできますが、GetLowestPricedOffersForSKUではアクセスできません。私は1つをハックしようとしたが、それはInvalid MarketplaceId
エラーを生成します。Amazon MWSのBotoメソッドGetLowestPricedOffersForSKU
後のBotoは非常に同様の構造APIのコードを持っている - GetLowestOfferListingsForSKU:
@requires(['MarketplaceId', 'SellerSKUList'])
@structured_lists('SellerSKUList.SellerSKU')
@api_action('Products', 20, 5, 'GetLowestOfferListingsForSKU')
def get_lowest_offer_listings_for_sku(self, request, response, **kw):
"""Returns the lowest price offer listings for a specific
product by item condition and SellerSKUs.
"""
return self._post_request(request, kw, response)
は、だから私はGetLowestPricedOffersForSKUにMWSの操作を変更するには@api_action
を修正:
### MINE ###
@requires(['MarketplaceId', 'SellerSKUList'])
@structured_lists('SellerSKUList.SellerSKU')
@api_action('Products', 20, 5, 'GetLowestPricedOffersForSKU')
def get_lowest_priced_offers_for_sku(self, request, response, **kw):
return self._post_request(request, kw, response)
次のように私は、このメソッドを呼び出します:
conn = connection.MWSConnection(
aws_access_key_id=ACCESS_KEY,
aws_secret_access_key=SECRET_KEY,
Merchant=ACCOUNT_ID
)
response = conn.get_lowest_priced_offers_for_sku(
MarketplaceId=marketplace_id, SellerSKUList=sku_list, ItemCondition=condition
)
get_lowest_priced_offers_for_sku
、Invalid MarketplaceId
というエラーが発生します。私が行う唯一の変更がget_lowest_offer_listings_for_sku
を呼び出すことです - すべての変数を同じにしておく - コードは有効な応答オブジェクトを見つけて返します。これはうまく動作します:
response = conn.get_lowest_offer_listings_for_sku(
MarketplaceId=marketplace_id, SellerSKUList=sku_list, ItemCondition=condition
)
は私がのboto経由でアマゾンMWS GetLowestPricedOffersForSKUにアクセスするために行うには何が必要ですか?