如何在ebaysdk上导入产品API?

时间:2019-05-19 11:37:47

标签: python ebay ebay-api

对不起,我的问题很愚蠢,但我没有找到答案就搜索了整个网络。 我正在尝试使用UPC查找有关产品的信息(描述,标题,图像,方面以及基本上所有内容)。我设法通过使用ebay的交易API(GetItem)和productID做到了这一点,但是,当我尝试使用UPC进行交易时,却遇到了问题。网络上没有太多的说明。我找到了函数getProductDetails,该函数可以回答我的问题: https://developer.ebay.com/devzone/product/CallRef/getProductDetails.html

这是我的代码:

from ebaysdk.trading import Connection
api = Connection(devid=dev_id, certid=cert_id, appid=app_id, token=token_id, globalId="EBAY-US", config_file=None) 
response = api.execute('getProductDetails', {"productDetailsRequest": {"dataset": {"UPC": "#UPCNUMBER"}}})
r = response.dict()
print(r)

但是,当我尝试使用相同的API(交易)时,出现此错误:

ConnectionError: 'getProductDetails: Class: RequestError, Severity: Error, Code: 2, Unsupported API call. The API call "getProductDetails" is invalid or not supported in this release.'

我试图了解我到底使用了哪种API,但是Internet上没有任何信息。从文档中,我可以了解到这是一个产品API。但是,在查看ebaysdk时。#something我没有看到合适的子模块。

有人对此有所了解吗?

预先感谢

0 个答案:

没有答案