php - Steam 网络 API : How to get the tags for items in Steam Inventory

标签 php json steam-web-api

我目前正在尝试使用 Steam Web API 获取玩家 Steam 库存中的标签项目。

我正在寻找的示例如下所示:

enter image description here

我一直在查看 steam web api ,但我还没有找到任何返回 Steam 库存项目标签的方法。

有谁知道怎么抓取这个?可能吗?

如有任何帮助,我们将不胜感激。

最佳答案

如果您特别需要这些标签:在切换游戏 list 时检查您的控制台。会有ajax请求链接。

例如 TF2:http://steamcommunity.com/profiles/YOUR_STEAM_ID/inventory/json/440/2/

用某个用户 steamid64 替换“YOUR_STEAM_ID”。 如果您想要其他游戏库存:将“440”更改为(570 - dota2、620 - portal2、730 - csgo、753 - steam 库存)。 此外,对于 Steam 库存,您必须更改其编号(1 - 礼物,6 - 卡片,其他元素也有 3 和 7 编号)

像其他 api 方法一样请求该链接。它将返回 json,您必须对其进行解码/解析。

然后观察“rgDescriptions”数组。会有你的标签。

关于php - Steam 网络 API : How to get the tags for items in Steam Inventory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27471536/

相关文章:

node.js - "personastateflags"是什么?

php - 在Elasticsearch上忽略ASCII字符

php - 运行PHP代码而无需等待Python返回值

php - 使用我的用户名和密码创建一个 JSON 格式的文本文件?

Steam API : How to get players in current game?

javascript - 如何从 Steam 中的其他个人资料获取愿望单数据?

CodeIgniter "Unable to load the requested class: iofactory"中的 PHPExcel 错误

json - 如何在 Swift 中解析递归 JSON?

java - Spring get请求到Object映射定制方式

json - 在 MVC3 中显示从 JSON 到表的数据