eBay API,如何从SiteCodeType获取数字的站点ID [英] eBay API, how to get numerical Site ID from SiteCodeType

查看:358
本文介绍了eBay API,如何从SiteCodeType获取数字的站点ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我想给用户选择网站进行探索的机会。
我所做的是显示现有网站的列表(使用String数组),然后使用枚举的valueOf()方法获取SiteCodeType。

In my app I want to give the user the opportunity to choose the site to explore. What I do is showing a list of the existing sites (using a String array) and then get the SiteCodeType with the valueOf() method of the enum.

这个值适用于一些API,但是我需要的是实际上是该站点的特定ID,我无法找到如何获取它。
我希望使用我已经拥有的SiteCodeType来获取它。

This value works with some APIs, but what I need is actually the specific ID of the site, and I can't find out how to get it. I hoped to get it somewhere using the SiteCodeType I already have.

我看到了GlobalID和SiteID,但我不明白如何使用它们。

I saw both GlobalID and SiteID but I don't understand how to work with them.

https://developer.ebay.com/DevZone/merchandising/docs/CallRef/Enums/GlobalIdList.html
https://developer.ebay.com/DevZone/merchandising/docs/Concepts/SiteIDToGlobalID.html

推荐答案

此实用程序可以在 SiteCodeType 和eBay数字站点ID 之间转换。

This utility converts between SiteCodeType and eBay numerical Site ID.

https://developer.ebay.com/DevZone/javasdk-jaxb/docs/LibRef/com/ebay/sdk/SiteIDUtil.html

这篇关于eBay API,如何从SiteCodeType获取数字的站点ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆