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

编程入门 行业动态 更新时间:2024-10-24 20:17:06
本文介绍了是否可以通过 API 以编程方式获取 eBay 类别列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

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

解决方案

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

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

open.api.ebay/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: developer.ebay/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

open.api.ebay/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 类别列表?

本文发布于:2023-11-25 17:22:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630660.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以通过   类别   方式   列表   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!