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

Get item's name in inventory #48

Closed Flodkozza closed 4 years ago

Flodkozza commented 4 years ago

The items don't have any attribute for name or anything that indicates which item it is. Is it possible to get that somehow?

k1de commented 4 years ago

You can use node-steam-tradeoffer-manager https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#getinventorycontentsappid-contextid-tradableonly-callback or https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#getuserinventorycontentssteamid-appid-contextid-tradableonly-callback callback will be like that https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/EconItem

DoctorMcKay commented 4 years ago

The way the CS:GO inventory system works, it actually is best to just use node-steamcommunity or node-steam-tradeoffer-manager to get an item's basic details. Using node-globaloffensive is really meant for getting the data you can't get from the Steam Community APIs.