Closed ghost closed 8 years ago
So far as I know, I'm using:
steamUser.gamesPlayed({
'games_played':[
{'game_id':214610}
]
});
Unfortunately, I somehow have a confusing way of parsing what I'm doing (currently I'm passing an array of ints to this...). Somehow, one of those is working with bot.setGames(parseInt([214610,282800].toString()));
.
I should probably be figuring out/fixing my own code before advising someone else...
It's an array of game_id key/value pair objects:
steamUser.gamesPlayed([{
"game_id": "730"
}]);
steamUser.gamesPlayed([{
"game_id": "730"
},{
"game_id": "731"
}]);
gamesPlayed takes a CMsgClientGamesPlayed object.
The structure of protobuf objects as passed and received by node-steam is described here.
So you could call gamesPlayed
like this:
user.gamesPlayed({
games_played: [{
game_id: '731',
game_flags: 1234134 // god knows what this is
}, {
// other games
}],
client_os_type: 123123 // god knows what this is
});
Of course you can skip fields that are optional
.
Suggestions on how the docs could be made clearer are welcome.
I can guess that
gamesPlayed
is an array, but it is not described anywhere what is the format of that array, if I want to use it for CS:GO for example, if I use:It doesn't work. It gives error: