Skip to content

Commit 733d912

Browse files
author
Justin Skiles
authored
Update README.md
1 parent a9b052a commit 733d912

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,39 @@ Gain a basic understanding of how Valve's Steam Web API is laid out: please see
3737
1. Read the `About` section so you understand why this library exists
3838
2. Install the library from NuGet
3939
3. Instantiate an object from any class that inherits from `SteamWebInterface` for whatever endpoint you want to use
40-
1. Requires a Steam Web API developer key (KEEP THIS SECRET)
40+
1. Requires a Steam Web API developer key. [Get one here](https://steamcommunity.com/dev/apikey). **KEEP THIS SECRET**.
4141
2. Some endpoints require an AppId (such as 440 for Team Fortress 2)
4242
4. Call the method with your parameters that you want to use
4343

44+
The library is structured to mirror the endpoint structure. For example, the "DOTA2Econ" class will expose methods to communicate with the "IDOTA2Econ" endpoints.
45+
46+
Each method returns a SteamWebResponse object which contains the following:
47+
48+
| Field | Type | Description |
49+
|--------------------|-----------------|----------------------------------------------------|
50+
| Data | T | Maps to the payload returned by the Steam Web API. |
51+
| ContentLength | long? | Maps tot he HTTP ContentLength header. |
52+
| ContentType | string | Maps to the HTTP ContentType header. |
53+
| ContentTypeCharSet | string | Maps to the HTTP ContentType charset header. |
54+
| Expires | DateTimeOffset? | Maps to the HTTP Expires header. Optional. |
55+
| LastModified | DateTimeOffset? | Maps to the HTTP LastModified header. Optional |
56+
4457
## Sample Usage
58+
4559
```cs
4660
// this will map to the ISteamUser endpoint
4761
var steamInterface = new SteamUser("<devKeyHere>");
4862

4963
// this will map to ISteamUser/GetPlayerSummaries method in the Steam Web API
5064
// see PlayerSummaryResultContainer.cs for response documentation
51-
var playerSummary = await steamInterface.GetPlayerSummaryAsync(<steamIdHere>);
65+
var playerSummaryResponse = await steamInterface.GetPlayerSummaryAsync(<steamIdHere>);
66+
var playerSummaryData = playerSummaryResponse.Data;
67+
var playerSummaryLastModified = playerSummaryResponse.LastModified;
5268

5369
// this will map to ISteamUser/GetFriendsListAsync method in the Steam Web API
5470
// see FriendListResultContainer.cs for response documentation
55-
var friendsList = await steamInterface.GetFriendsListAsync(<steamIdHere>);
71+
var friendsListResponse = await steamInterface.GetFriendsListAsync(<steamIdHere>);
72+
var friendsList = friendsListResponse.Data;
5673
```
5774

5875
## Changes from 2.0 to 3.0

0 commit comments

Comments
 (0)