好吧,所以我一直在互联网上寻找这个,我发现当你想获得某人的蒸汽库存时,你可以使用这个:
http://api.steampowered.com/IEconItems_{appid}/GetPlayerItems/v0001/?key={apikey}&steamid={steamid}&format=json
但问题是,当我为 CS:GO 执行此操作时(appid:730
),即使用户的库存中有物品,我也只是收到空响应。
如果您想获取 json,只需使用以下链接之一:
一般 Steam 库存:(1:游戏,3:优惠券,6:交易卡,7:奖励)
http://steamcommunity.com/id/<USERURL>/inventory/json/753/1
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/1
http://steamcommunity.com/id/<USERURL>/inventory/json/753/3
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/3
http://steamcommunity.com/id/<USERURL>/inventory/json/753/6
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/6
http://steamcommunity.com/id/<USERURL>/inventory/json/753/7
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/7
games :
http://steamcommunity.com/id/<USERURL>/inventory/json/<APPID>/2
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/<APPID>/2
问题不在于《反恐精英》appid,
您刚刚使用了仅适用于一般 Steam 库存的旧链接。
我建议您使用 STEAMID 链接,因为并非每个 steam 用户都设置了自定义 URL。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)