Skip to content

igeligel/skadisteam.inventory

Repository files navigation

skadisteam.inventory

NuGet Discord

If you join the discord, message igeligel.

Build Status
Linux/Mac WIP
Windows Build status

Project

.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

Dependencies

Package Version
NETStandard.Library 1.6.0
Newtonsoft.Json 9.0.1

Installation

As Nuget Package (Recommended)

WIP

Referenced as built package

  1. You need to install .net core. For instructions head over here.

  2. Open your command line.

  3. Change directory to the package's source.

  4. $ dotnet restore
    
  5. $ dotnet build
    
  6. Reference your build like this:

    "skadisteam.inventory": "0.1.0-*"
    

    in your project.json file. For an example watch the testing package.

How to use

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:

  1. 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.

  2. 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:

  1. 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.

  2. 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.

Documentation

The documentation is referenced here:

Click me to get to the documentation

Contribute

Watch the master repository for more information.

Authors

Contact

Steam Steam

Twitter Twitter

Discord Discord (I am igeligel there. Just send me a direct message)

License

MIT