How to send ServiceMethod calls from client?
walamana opened this issue · 2 comments
walamana commented
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?
How can I send such service method calls?
seishun commented
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.
walamana commented
Ah, cool, this works, thanks 😄. I didn't know that I can create new instances of unified messages.