Skip to content
Justin Skiles edited this page Apr 17, 2020 · 6 revisions

Install the Package

Package Manager:

Install-Package SteamWebAPI2

.NET Core CLI:

dotnet add package SteamWebAPI2

Create an Interface Factory

  • Get a Steam Web API key. Don't expose this key to your users.
  • Use that key to create a factory. The factory generates interfaces to communicate with the Steam Web API.
  • This should be a singleton. There's no reason to have multiple factories.

var webInterfaceFactory = new SteamWebInterfaceFactory(<dev api key here>);

Create an Interface

webInterfaceFactory.CreateSteamWebInterface<T>();

Example to get a player profile summary:

var steamUserInterface = webInterfaceFactory.CreateSteamWebInterface<SteamUser>();
var playerSummaryResponse = await steamInterface.GetPlayerSummaryAsync(<steamIdHere>);
var playerSummaryData = playerSummaryResponse.Data;