Eradicate Posted April 15, 2018 Report Share Posted April 15, 2018 (edited) Heyo,I've been looking to load someones inventory, I'd like to get the contents and send them over to the server, would the following way be a good way to load someones inventory? Would I be needing to cache their inventories? var request = require('request'); request('https://steamcommunity.com/inventory/x/578080/2', function(error, response, body) { if(error){ console.log(error); return; } var inventory = JSON.parse(body); inventory.descriptions.forEach(function(data){ console.log(data.market_name); }); });Also, would I not just be able to load someones inventory using manager.getUserInventoryContents to load their inventories without having to cache anything? Edited April 15, 2018 by Eradicate Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 15, 2018 Report Share Posted April 15, 2018 I don't understand what you're trying to do here. Why manually make the request instead of using getUserInventoryContents? What do you mean by "not having to cache anything"? Quote Link to comment Share on other sites More sharing options...
Eradicate Posted April 16, 2018 Author Report Share Posted April 16, 2018 I don't understand what you're trying to do here. Why manually make the request instead of using getUserInventoryContents? What do you mean by "not having to cache anything"?People going on my site should have got their inventory loaded, therefore I want to get the contents from his inventory, send it to the client, and load his inventory on there. I believe getUserInventoryContents requires a manager to be used, and I'm using multiple bots, it would seem to me like a bad sport just to use a random bots his manager to load someones inventory. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 16, 2018 Report Share Posted April 16, 2018 You could always use node-steamcommunity's getUserInventoryContents, which is what steam-tradeoffer-manager calls anyway. Eradicate 1 Quote Link to comment Share on other sites More sharing options...
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.