metuero Posted May 20, 2016 Report Posted May 20, 2016 Hi,I'm a little confused about the uses of steam-user. I'm creating a trade site and for the bot I'm using steam-client/steam-user/etc without problems. But in the website, I need get the info of a logged users into Steam for example their avatars. Is a good idea use steam-user for this kind of functionalities or I need other package that wrap the Steam Web Api like steam-web? Thanks. Quote
Dr. McKay Posted May 20, 2016 Report Posted May 20, 2016 You can use getPersonas to get persona data. Off the top of my head (this might not work), getting an avatar URL would go something like this: user.getPersonas(["76561198006409530"], (personas) => { var hash = personas["76561198006409530"].avatar_hash.toString('hex'); var url = "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/" + hash.substring(0, 2) + "/" + hash + "_full.jpg"; }); metuero 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.