Morgyn Posted Friday at 06:20 PM Report Posted Friday at 06:20 PM Hi, Would it be possible to have an interface to grab the server that someone is connected to with the green "Join Game" button. <div class="profile_in_game persona in-game"> <div class="profile_in_game_header">Currently In-Game</div> <div class="profile_in_game_name"> Rust </div> <div class="profile_in_game_joingame"> <a href="steam://connect/1.2.3.4:12345" class="btn_green_white_innerfade btn_small_thin"> <span>Join Game</span> </a> </div> </div> Above is the section of code that contains the button, I'm not sure if this is out of scope of this library. Thanks! Quote
Morgyn Posted Friday at 06:53 PM Author Report Posted Friday at 06:53 PM (edited) I have just noticed from the source you pull from the xml version. <inGameServerIP>1.2.3.4:12345</inGameServerIP><inGameInfo> <gameName>Rust</gameName> <gameLink>https://steamcommunity.com/app/252490</gameLink> <gameIcon> https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/apps/252490/820be4782639f9c4b64fa3ca7e6c26a95ae4fd1c.jpg </gameIcon> <gameLogo> https://shared.cloudflare.steamstatic.com/store_item_assets/steam/apps/252490/21aac0b6e20e1ba12f635e7deb730e32a51afbd5/capsule_184x69.jpg?t=1738927718 </gameLogo> <gameLogoSmall> https://shared.cloudflare.steamstatic.com/store_item_assets/steam/apps/252490/21aac0b6e20e1ba12f635e7deb730e32a51afbd5/capsule_184x69.jpg?t=1738927718 </gameLogoSmall> <gameJoinLink>steam://connect/1.2.3.4:12345</gameJoinLink> </inGameInfo> Edited Friday at 06:55 PM by Morgyn Quote
Dr. McKay Posted Friday at 11:06 PM Report Posted Friday at 11:06 PM You can get that data using GetPlayerSummaries. Quote
Morgyn Posted Monday at 12:23 PM Author Report Posted Monday at 12:23 PM So implement node-steam instead? I really don't want to have to implement authentication for something that's just public. Would you be against me submitting a pull request if I add this to node-steamcommunity? Should be fairly trivial as you're already pulling the data. Quote
Dr. McKay Posted Monday at 02:35 PM Report Posted Monday at 02:35 PM Why would you need to authenticate? Just use an API key. Quote
Morgyn Posted Monday at 04:14 PM Author Report Posted Monday at 04:14 PM Sorry I misspoke, apikey rather than authentication. I would rather not to have to either use both or reimplement in node-steam when I know the data is right there in the xml query that node-steamcommunity is already using. I've made a basic first pass that extracts the info I need: https://github.com/Morgyn/node-steamcommunity/blob/master/classes/CSteamUser.js Quote
Dr. McKay Posted yesterday at 02:16 AM Report Posted yesterday at 02:16 AM Those xml endpoints are pretty unreliable and anything that uses them should probably be considered deprecated. Using the WebAPI for anything that it covers is going to be your best bet. 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.