seishun / node-steam

Interface directly with Steam servers from Node.js
MIT License
1k stars 181 forks source link

Can't seem to call gamesPlayed #364

Closed HybridFox closed 8 years ago

HybridFox commented 8 years ago

I might be stupid and doing this completely wrong, but i can't seem to figure this out:

steamUser.gamesPlayed({games_played: { GamePlayed: { game_id: 238090 } }});

Error: .CMsgClientGamesPlayed.GamePlayed#GamePlayed is not a field: undefined

seishun commented 8 years ago
  1. games_played is a repeated field, so the games_played property must be an array.
  2. Messages are represented as simple objects in JS. The message type is inferred, so "GamePlayed" shouldn't be anywhere in JS.
  3. fixed64 are represented as strings.
steamUser.gamesPlayed({games_played: [
  {
    game_id: '238090'
  }
]});
HybridFox commented 8 years ago

Thanks alot!