Steam Web API获得CS:GO库存

时间:2022-08-08 16:59:52

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

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.

但问题在于,当我为CS:GO(appid:730)执行此操作时,即使用户的库存中有项目,我也会得到一个空回复。

1 个解决方案

#1


15  

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

如果你想获得json只需使用以下链接之一:

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

一般蒸汽库存:(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

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.

问题不在于反击appid,你只是使用了一个只适用于一般蒸汽库存的旧链接。我建议你使用STEAMID链接,因为不是每个蒸汽用户都设置了自定义。

#1


15  

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

如果你想获得json只需使用以下链接之一:

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

一般蒸汽库存:(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

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.

问题不在于反击appid,你只是使用了一个只适用于一般蒸汽库存的旧链接。我建议你使用STEAMID链接,因为不是每个蒸汽用户都设置了自定义。