Steam Web API获取CS:GO库存 [英] Steam web API getting CS:GO inventory

查看:768
本文介绍了Steam Web API获取CS:GO库存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我一直在互联网上寻找它,而我发现,当您想获取某人的蒸汽清单时,可以使用以下方法:

Alright, so I have been looking for this all over the internet, and what I have found out is that when you want to get someones steam inventory you use this:

http://api.steampowered.com/IEconItems_{appid}/GetPlayerItems/v0001/?key={apikey}&steamid={steamid}&format=json

但是问题是,当我对CS:GO(应用程序:730)执行此操作时,即使用户的库存中有物品,我也只会得到一个空响应.

But the problem is that when I do that for CS:GO (appid: 730), I just get an empty response back, even though the user has items in their inventory.

推荐答案

如果要获取json,只需使用以下链接之一:

if you want to get the json just use one of the following links:

一般蒸汽库存:( 1:游戏,3:优惠券,6:交易卡,7:奖励)

general steam inventory: ( 1: games, 3: coupons, 6: trading cards, 7: rewards )

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

游戏:

http://steamcommunity.com/id/<USERURL>/inventory/json/<APPID>/2
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/<APPID>/2

问题不是反恐精英, 您只是使用了仅适用于常规蒸汽清单的旧链接. 我建议您使用使用STEAMID的链接,因为并非每个Steamuser都设置了一个customurl.

the problem was not the counter-strike appid, you just used an old link that only works for the general steam inventory. I suggest you using the link using STEAMID because not every steamuser has set a customurl.

这篇关于Steam Web API获取CS:GO库存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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