蒸汽的Web API获得徽章图片URL [英] Steam Web API get Badge Image URL

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

问题描述

所以我希望得到来自蒸汽的徽章图像的URL。

/ IPlayerService / GetBadges / V1 / 给出:

  {
回应:{
    徽章:[
        {
            badgeid:2,
            级别:2,
            completion_time:1374530451,
            XP:200,
            稀缺性:1711283
        },
        {
            badgeid:8,
            1级,
            completion_time:1356256226,
            XP:100,
            稀缺性:741879
        },
        {
            badgeid:1,
            APPID:245070,
            1级,
            completion_time:1379186990,
            XP:100,
            communityitemid:227090978,
            border_color:0,
            稀缺性:688570
        },
        {
            badgeid:1,
            APPID:219150,
            1级,
            completion_time:1379187097,
            XP:100,
            communityitemid:227093331,
            border_color:0,
            稀缺性:101278
        },
    ]
    ,
    player_xp:1227,
    PLAYER_LEVEL:11,
    player_xp_needed_to_level_up:173,
    player_xp_needed_current_level:1200
}}

但徽章的图像保存在:
<一href=\"http://cdn.akamai.steamstatic.com/steamcommunity/public/images/items/218620/d7ba194fac98cc5755fe7f08a8a7e2400acac43e.png\" rel=\"nofollow\">http://cdn.akamai.steamstatic.com/steamcommunity/public/images/items/218620/d7ba194fac98cc5755fe7f08a8a7e2400acac43e.png

我可以得到从 / IPlayerService / GetBadges / V1 / ,但只给了我:

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

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

来源


解决方案

我不认为你可以特里。我试图获得的武器图片类似游戏的时候有这个同样的问题。我有我的服务器上下载图像并存储它们,然后参考。他们只是根本没有经过那里API提供的网址。

蒸汽API不是很大。

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

/IPlayerService/GetBadges/v1/ gives:

{
"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

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

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

Sources

解决方案

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 is not great.

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

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