DoctorMcKay / node-globaloffensive

A Node.js module to connect to and interact with the CS2 game coordinator. Mostly used to get item data.
https://www.npmjs.com/package/globaloffensive
MIT License
262 stars 61 forks source link

Fix incorrect name for steamid variable in requestLiveGameForUser #28

Closed Yaroslav-95 closed 5 years ago

Yaroslav-95 commented 5 years ago

There is an error inside the requestLiveGameForUser method, where the steamid variable is incorrenctly referenced as sid

Also, I have a question regarding the requestRecentGames function. It doesn't return anything, unless you specify your own steamID. Is that the way it should behave? I am looking for a way to get the Sharecode from a match after it has ended.

DoctorMcKay commented 5 years ago

Thanks for the bugfix.

Also, I have a question regarding the requestRecentGames function. It doesn't return anything, unless you specify your own steamID. Is that the way it should behave? I am looking for a way to get the Sharecode from a match after it has ended.

I'm sorry, I don't know how the GC is supposed to act for this.

Yaroslav-95 commented 5 years ago

Thanks for the bugfix.

My pleasure. Thank you for writing this module!

Do you have any ideas how I could find such a method for obtaining the Sharecode? As far as I am aware, all of the methods that are currently available in your module were reverse-engineered. If that's so, how did you go about reverse-engineering them?

DoctorMcKay commented 5 years ago

I don't really do CS:GO. Can you give me an example of a sharecode?

Yaroslav-95 commented 5 years ago

It's a string of text that allows you to open another person's match demo, it looks like this CSGO-3KBvR-JthRe-hiYnN-9yiiC-soi9Q

DoctorMcKay commented 5 years ago

Doesn't look like it's base64 or something like that (although I could be wrong), so it's probably issued by the GC in some message.

Yaroslav-95 commented 5 years ago

It's supposed to be decoded into three parts, matchid, outcomeid, and token. But I haven't found a way to find that data besides the matchid. This information is required to get the link to a player's demo/replay file.