【发布时间】:2017-04-17 13:16:14
【问题描述】:
我正在尝试提出 getmyebaysales 请求,以便跟踪当前商品的价格和数量。
按照文档和示例here,我生成了一个令牌并尝试向生产 XML 发送请求以查看我当前的列表。
当前尝试:
endpoint = "https://api.ebay.com/ws/api.dll"
xml = """<?xml version="1.0" encoding="utf-8"?>
<GetMyeBaySellingRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>AgAAAA*...full auth token here...wIAYMEFWl</eBayAuthToken>
</RequesterCredentials>
<Version>967</Version>
<ActiveList>
<Sort>TimeLeft</Sort>
<Pagination>
<EntriesPerPage>3</EntriesPerPage>
<PageNumber>1</PageNumber>
</Pagination>
</ActiveList>
</GetMyeBaySellingRequest>"""
headers = {'Content-Type': 'application/xml'}
response = requests.post(endpoint, data=xml, headers=headers)
print response
print response.content
回应:
<?xml version="1.0" encoding="UTF-8" ?><GeteBayOfficialTimeResponse xmlns="urn:ebay:apis:eBLBaseComponents"><Timestamp>2017-04-17 13:01:25</Timestamp><Ack>Failure</Ack><Errors><ShortMessage>Unsupported API call.</ShortMessage><LongMessage>The API call "GeteBayOfficialTime" is invalid or not supported in this release.</LongMessage><ErrorCode>2</ErrorCode><SeverityCode>Error</SeverityCode><ErrorClassification>RequestError</ErrorClassification></Errors><Build>18007282</Build></GeteBayOfficialTimeResponse>
该响应的有用部分:
The API call "GeteBayOfficialTime" is invalid or not supported in this release.
我在这里使用他们自己的文档样本。我真正能看到的唯一时间链接是<Sort>TimeLeft</Sort>,这有点牵强,但即使没有,我也会得到相同的响应。
我一直在使用不同的 Python 库,试图在没有太多文档的情况下让 getmyebaysales 请求正常工作。现在通过 eBay 自己的文档,我感觉自己已经死在水中了。如果有人可以将我推向正确的方向,我将不胜感激。不太确定下一步该尝试什么。
【问题讨论】: