If you join the discord, message igeligel.
Build Status | |
---|---|
Linux/Mac | WIP |
Windows |
.net core library to get inventories in the Steam Community. It will enable you to:
- Get public inventories in a nice and easy to understand datastructure (No Dictionaries)
- Get private inventories by login data and trade tokens
Package | Version |
---|---|
NETStandard.Library | 1.6.0 |
Newtonsoft.Json | 9.0.1 |
WIP
-
You need to install .net core. For instructions head over here.
-
Open your command line.
-
Change directory to the package's source.
-
$ dotnet restore
-
$ dotnet build
-
Reference your build like this:
"skadisteam.inventory": "0.1.0-*"
in your project.json file. For an example watch the testing package.
All the core functionalities are built around the SkadiInventoryClient. For documentation check out the documentation.
To use the public available inventory you need to do these steps:
-
Create the configuration instace
var skadiLoadInventoryConfiguration = new SkadiLoadInventoryConfiguration { AppId = 730, ContextId = 2, PartnerCommunityId = 76561198028630048, TradableItems = true };
This will create the configuration for requesting inventories. It will request the appid, contextid, partner community id and a boolean if the items should be tradable.
-
Now we need to transfer the instance as parameter to a function given by the SkadiInventoryClient.
var inventory = SkadiInventoryClient.LoadInventory(skadiLoadInventoryConfiguration);
The inventory instance will hold now an inventory modelled by the SkadiInventory class.
We can also request private profiles if we have the trade token and successful login information:
-
Create an instance of SkadiLoadPartnerInventoryConfiguration
var skadiLoadPartnerInventoryConfiguration = new SkadiLoadPartnerInventoryConfiguration { AppId = 730, ContextId = 2, PartnerCommunityId = 76561198028630048, SessionId = "XXX, SteamLoginSecure = "76561198028630048XXXXXX", TradeToken = "XXXXXXXX", TradableItems = false };
This configuration got similar properties compared to the inventory configuration of the public inventory.
-
This instance needs to be transferred as parameter to a function of the SkadiInventoryClient.
var inventory = SkadiInventoryClient .LoadPartnerInventory(skadiLoadPartnerInventoryConfiguration);
The inventory instance will hold now an inventory modelled by the SkadiInventory class.
The documentation is referenced here:
Click me to get to the documentation
Watch the master repository for more information.
Discord (I am igeligel there. Just send me a direct message)