seishun / node-steam

Interface directly with Steam servers from Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to send ServiceMethod calls from client?

walamana opened this issue · comments

I've been looking for a solution to gather the last played games of a user. I took a look at a steam nethook dump and found a outgoing message "ServiceMethodCallFromClient" with the target_job_name "Player.ClienGetLastPlayedTimes#1", but could not find a protobuf for it?

nethookanalyzer2_2018-11-07_19-32-14

How can I send such service method calls?

Is this not it? https://github.com/SteamRE/SteamKit/blob/c3f261d6c0a1543f3db7117ee8ab1bc6001a042f/Resources/Protobufs/steamclient/steammessages_player.steamclient.proto#L162

You should be able to construct a UnifiedMessages instance with new Steam.SteamUnifiedMessages(steamClient, 'Player'); and then call send on it like this:

player.send('ClientGetLastPlayedTimes', { min_last_played: whatever }, (result, resp) => {
  // handle result and resp as needed
});

I didn't try it, let me know if it works.

Ah, cool, this works, thanks 😄. I didn't know that I can create new instances of unified messages.