问题
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
- Steam Web API: http://steamcommunity.com/dev
- Steam Web API Wiki: http://wiki.teamfortress.com/wiki/Category:WebAPI
- xPaw Docs: http://lab.xpaw.me/steam_api_documentation.html
- Sample Badge Page: http://steamcommunity.com/id/TerryIGN/badges/
回答1:
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.
来源:https://stackoverflow.com/questions/24597265/steam-web-api-get-badge-image-url