Pergunta

Is there an API to get a user's steam trading cards?

I'm not very familiar with steam but it doesn't seem to be on this page.

https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerSummaries_.28v0001.29

There's an achievements API would that get me the trading cards info as well?

Foi útil?

Solução

There is not an API for the trading cards (yet). You can, however, still find them. It does depend on the user's privacy settings though. I went into more detail on this question and believe it will help you out.

Achievements can be pulled via the GetPlayerAchievements API call using the following format:

http://api.steampowered.com/ISteamUserStats/GetPlayerAchievements/v0001/?appid=<APPID>&key=<APIKEY>&steamid=<PROFILEID>l=<LANG>

APPID is the application ID the achievements are associated with (ie. Team Fortress 2 is 440) APIKEY is the API key Valve assigned you PROFILEID is the 64bit player ID give to you when you sign up on steam LANG is the language you wish to return the descriptions in (this parameter is optional and not including it removes the name and description fields from the results). en is for English.

In the response is a listing of all of the achievements in the game.

{
    "apiname": "TF_MVM_PYRO_BOMB_RESET",
    "achieved": 0,
    "name": "Hard Reset",
    "description": "As a Pyro, reset the bomb 3 times in a single wave."
},
{
    "apiname": "TF_MVM_ENGINEER_ESCAPE_SENTRY_BUSTER",
    "achieved": 1,
    "name": "Real Steal",
    "description": "As an Engineer, escape with your sentry as a sentry buster is about to detonate."
},
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top