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

Why does requestRecentGames not have any high and low in the matchID and reservationID? #25

Closed helloitsm3 closed 5 years ago

helloitsm3 commented 5 years ago

I was expecting to see

"reservationid": { "low": 65, "high": 715485165, "unsigned": true },

but instead saw

reservationid": "3334327332591632867"

Why is that so?

DoctorMcKay commented 5 years ago

The module converts Long objects into strings because that's going to be more useful for the vast majority of people.

helloitsm3 commented 5 years ago

Sorry, I think you misunderstood me. I needed the high and low value for encoding and decoding the shared link for the most recent matches, without those, I don't think I'm able to do it.

DoctorMcKay commented 5 years ago

You can always import something like Long.js to do that yourself. But what links specifically are you talking about?

helloitsm3 commented 5 years ago

for example, under "Your matches" in CSGO, you can copy the demo link "steam://rungame/730/76561202255233023/+csgo_download_match%20CSGO-T2ury-vE53N-5j3ZW-iVJXc-9P47M" the match ID "CSGO-T2ury-vE53N-5j3ZW-iVJXc-9P47M" can be decoded and encoded but in order to encode it, you need to have the high and low of match id and reservation id to do it which I'm unable to get it since the modules doesn't return it.

You can check this out: https://github.com/akiver/csgo-sharecode

DoctorMcKay commented 5 years ago

I'd suggest that you use long to get what you need.