Steam Web API 获取徽章图片 URL [英] Steam Web API get Badge Image URL

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

问题描述

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

So I'm looking to get the URL of the badge images from 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.steammunity/public/images/items/218620/d7ba194fac98cc5755fe7f08a8a7e2400acac43e.png

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

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

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

那么我如何从特定的 Steam 用户那里获取已完成徽章的徽章图像?

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

来源

推荐答案

我不认为你可以 Terry.在尝试获取类似游戏的武器图像时,我遇到了同样的问题.我必须下载图像并将它们存储在我的服务器上以供参考.他们只是没有通过api提供网址.

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.

Steam API 不是很好.

Steam API is not great.

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

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