Question

I am currently trying to move my application from Steam Xml Api to Steam Web Api.

In the old Xml Api I had for each achievement following xml:

<achievement closed="0">
    <iconClosed>http://media.steampowered.com/steamcommunity/public/images/apps/205830/d21efac1184e37b4b344d18639db18cf40979018.jpg</iconClosed>
    <iconOpen>http://media.steampowered.com/steamcommunity/public/images/apps/205830/7a4517495fba9f34642efd3983a561f55770f36c.jpg</iconOpen>
    <name>Manic Matcher</name>
    <apiname>st_ach_24</apiname>
    <description>Achieve 5 Consecutive Quick Matches</description>
</achievement>

This is Containing Achievement Pics.

In the ISteamUserStats interface I get only this response:

{
"apiname": "ST_ACH_05",
"achieved": 0,
"name": "Silver Medal",
"description": "50 shot streak"
}

So, is there an Interface which give me the Image from ST_ACH_05? If not what can i do? Is it ok do use the deprecated XML Api?

References:

Was it helpful?

Solution

You want to use the GetSchemaForGame API call.

http://api.steampowered.com/ISteamUserStats/GetSchemaForGame/v0002/?key=YOURKEY&appid=APPID&l=english&format=json

YOURKEY is the API key you have gotten from Valve. APPID is the application ID of the game you are looking for.

The API has the following format (taken from the above Wiki link)

game

    gameName (string)
        Steam internal (non-localized) name of game. 
    gameVersion (int)
        Steam release version number currently live on Steam. 
    availableGameStats

        achievements (Optional) (array)

            name (string)
                API Name of achievement. 
            defaultvalue (int)
                Always 0 (player's default state is unachieved). 
            displayName (string)
                Display title string of achievement. 
            hidden (int)
                If achievement is hidden to the user before earning achievement, value is 1. 0 if public. 
            description (string)
                Display description string of achievement. 
            icon (string)
                Absolute URL of earned achievement icon art. 
            icongray (string)
                Absolute URL of un-earned achievement icon art. 

        stats (Optional) (array)

            name (string)
                API name of stat. 
            defaultvalue (int)
                Default value of stat. 
            displayName (string)
                Developer provided name of string. 

With a data result (from TF2, appid 440) looking like this:

"achievements": [
                {
                    "name": "TF_PLAY_GAME_EVERYCLASS",
                    "defaultvalue": 0,
                    "displayName": "Head of the Class",
                    "hidden": 0,
                    "description": "Play a complete round with every class.",
                    "icon": "http://media.steampowered.com/steamcommunity/public/images/apps/440/tf_play_game_everyclass.jpg",
                    "icongray": "http://media.steampowered.com/steamcommunity/public/images/apps/440/tf_play_game_everyclass_bw.jpg"
                },
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top