Steam.getRecentlyPlayedGames()

GetRecentlyPlayedGames returns a list of games a player has played in the last two weeks, if the profile is publicly visible. Private, friends-only, and other privacy settings are not supported unless you are asking for your own personal details (ie the WebAPI key you are using is linked to the steamid you are requesting).

Usage

Hover over inputs/exits for more info.

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


// GetRecentlyPlayedGames returns a list of games a player has played in the last two weeks, if the profile is publicly visible. Private, friends-only, and other privacy settings are not supported unless you are asking for your own personal details (ie the WebAPI key you are using is linked to the steamid you are requesting).

Steam.getRecentlyPlayedGames({

steamid: '76561197960435530',

key: 'XXXXXXXXXXXXXXXXXXXXXXX',

count: 2,

}).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'
count

Optionally limit to a certain number of games (the number of games a person has played in the last 2 weeks is typically very small)

2

Exits

error

An unexpected error occurred.

success

OK.

{ total_count: 1,
  games: 
   [ { appid: 570,
       name: 'Dota 2',
       playtime_2weeks: 1927,
       playtime_forever: 125905,
       img_icon_url: '0bbb630d63262dd66d2fdd0f7d37e8661a410075',
       img_logo_url: 'd4f836839254be08d8e9dd333ecc9a01782c26d2' } ] }