沃梦达 / 编程问答 / php问题 / 正文

是否可以通过 API 以编程方式获取 eBay 类别列表?

Is it possible to get the eBay Category List via an API programmatically?(是否可以通过 API 以编程方式获取 eBay 类别列表?)

本文介绍了是否可以通过 API 以编程方式获取 eBay 类别列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是以编程方式获取 eBay 类别列表.

GetCategories 方法似乎只能从 Trading API 获得.如果我理解正确,登录交易 API 需要用户交互:http://developer.ebay.com/DevZone/XML/docs/HowTo/Tokens/GettingTokens.html

是否有另一种以编程方式获取 eBay 类别列表的方法?

我使用的是 Drupal 7,所以是 PHP.

解决方案

您不需要令牌来获取类别.您所需要的只是您的 App-ID

下面带有您的 APP-ID 的链接将返回来自站点的 XML 类别列表:UK (siteid=3)设置 CategoryID=-1 从根级别开始列表,您可以从任何类别开始,只需使用 IncludeSelector=ChildCategories 来获取孩子

http://open.api.ebay.com/Shopping?callname=GetCategoryInfo&appid=YOUR-APP-ID&siteid=3&CategoryID=-1&version=729&IncludeSelector=ChildCategoriesp>

现在只需使用 SimpleXML 或其他任何东西来解析.

My goal is to get a list of eBay categories programmatically.

It appears that the GetCategories method is only available from the Trading API. If I understand correctly, there is user interaction required to log into the Trading API: http://developer.ebay.com/DevZone/XML/docs/HowTo/Tokens/GettingTokens.html

Is there another method to get the eBay categories list programmatically?

I'm using Drupal 7, so PHP.

解决方案

You do not need a token to get the categories. All you need is your App-ID

The link below with your APP-ID will return the XML category listing from site: UK (siteid=3) Setting CategoryID=-1 starts the list at the root level, you can start from any category, just use IncludeSelector=ChildCategories to get children

http://open.api.ebay.com/Shopping?callname=GetCategoryInfo&appid=YOUR-APP-ID&siteid=3&CategoryID=-1&version=729&IncludeSelector=ChildCategories

Now just use SimpleXML or whatever to parse.

这篇关于是否可以通过 API 以编程方式获取 eBay 类别列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:是否可以通过 API 以编程方式获取 eBay 类别列表?

基础教程推荐