Steam Web API获取徽章图片URL

时间:2014-07-06 15:12:36

标签: php json api badge steam

所以我想从Steam获取徽章图片的网址。

/ IPlayerService / GetBadges / v1 / 给出:

{
"response": {
    "badges": [
        {
            "badgeid": 2,
            "level": 2,
            "completion_time": 1374530451,
            "xp": 200,
            "scarcity": 1711283
        },
        {
            "badgeid": 8,
            "level": 1,
            "completion_time": 1356256226,
            "xp": 100,
            "scarcity": 741879
        },
        {
            "badgeid": 1,
            "appid": 245070,
            "level": 1,
            "completion_time": 1379186990,
            "xp": 100,
            "communityitemid": "227090978",
            "border_color": 0,
            "scarcity": 688570
        },
        {
            "badgeid": 1,
            "appid": 219150,
            "level": 1,
            "completion_time": 1379187097,
            "xp": 100,
            "communityitemid": "227093331",
            "border_color": 0,
            "scarcity": 101278
        },
    ]
    ,
    "player_xp": 1227,
    "player_level": 11,
    "player_xp_needed_to_level_up": 173,
    "player_xp_needed_current_level": 1200
} }

但徽章图片保存在: http://cdn.akamai.steamstatic.com/steamcommunity/public/images/items/218620/d7ba194fac98cc5755fe7f08a8a7e2400acac43e.png

我可以从 / IPlayerService / GetBadges / v1 / 获取,但这只能给我:

http://cdn.akamai.steamstatic.com/steamcommunity/public/images/items/<appID>/d7ba194fac98cc5755fe7f08a8a7e2400acac43e.png

那么如何从特定的蒸汽用户那里获得已完成徽章的徽章图像?

来源

1 个答案:

答案 0 :(得分:4)

我不认为你可以特里。当我试图获得类似游戏的武器图像时,我遇到同样的问题。我不得不下载图像并将它们存储在我的服务器上然后参考。他们只是没有通过那里的网址提供网址。

Steam API不是很好。