Steam.getPlayerAchievements()

Returns a list of achievements for this user by app id

Usage

Hover over inputs/exits for more info.

var Steam = require('machinepack-steam');


// Returns a list of achievements for this user by app id

Steam.getPlayerAchievements({

steamid: '76561197960435530',

key: 'XXXXXXXXXXXXXXXXXXXXXXX',

appid: 400,

l: 'en_US',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

steamid required

64 bit Steam ID to return achievements for.

'76561197960435530'
key required

Steam API Key

'XXXXXXXXXXXXXXXXXXXXXXX'
appid required

The ID for the game you're requesting.

400
l

Language. If specified, it will return language data for the requested language.

'en_US'

Exits

error

An unexpected error occurred.

success

OK.

{ playerstats: 
   { steamID: '76561197972495328',
     gameName: 'Team Fortress 2',
     achievements: [ { apiname: 'TF_PLAY_GAME_EVERYCLASS', achieved: 1 } ],
     success: true } }