Steam Web API获取徽章图片URL

时间:2021-06-29 17:00:37

So I'm looking to get the URL of the badge images from Steam.

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

/IPlayerService/GetBadges/v1/ gives:

/ 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
} }

But the badge images are saved on: http://cdn.akamai.steamstatic.com/steamcommunity/public/images/items/218620/d7ba194fac98cc5755fe7f08a8a7e2400acac43e.png

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

I can get the from /IPlayerService/GetBadges/v1/ but that only gives me:

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

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

So how do I get the badge images of completed badges from a specific steam user?

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

Sources

来源

1 个解决方案

#1


4  

I don't think you can Terry. I am having this same issue when trying to get weapon images for a similar game. I am having to download the images and store them on my server to then reference. They just simply haven't made the url available through there api.

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

Steam API is not great.

Steam API不是很好。

#1


4  

I don't think you can Terry. I am having this same issue when trying to get weapon images for a similar game. I am having to download the images and store them on my server to then reference. They just simply haven't made the url available through there api.

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

Steam API is not great.

Steam API不是很好。