File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 <Compile Include =" SteamInterface.cs" />
9494 <Compile Include =" SteamNewsResultContainer.cs" />
9595 <Compile Include =" SteamServerInfo.cs" />
96+ <Compile Include =" TF2\GoldenWrenchResultContainer.cs" />
9697 <Compile Include =" UserAchievements.cs" />
9798 <Compile Include =" UserBanStatus.cs" />
9899 <Compile Include =" UserGroupListResultContainer.cs" />
110111 </ItemGroup >
111112 <ItemGroup >
112113 <Folder Include =" SteamCommunity\" />
113- <Folder Include =" TF2\" />
114114 </ItemGroup >
115115 <Import Project =" $(MSBuildToolsPath)\Microsoft.CSharp.targets" />
116116 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Original file line number Diff line number Diff line change 1+ // Generated by Xamasoft JSON Class Generator
2+ // http://www.xamasoft.com/json-class-generator
3+
4+ using Newtonsoft . Json ;
5+ using SteamWebAPI2 . Models . Utilities ;
6+ using System ;
7+ using System . Collections . Generic ;
8+
9+ namespace SteamWebAPI2 . Models
10+ {
11+ public class GoldenWrench
12+ {
13+ [ JsonProperty ( "steamID" ) ]
14+ public object SteamId { get ; set ; }
15+
16+ [ JsonConverter ( typeof ( UnixTimeJsonConverter ) ) ]
17+ [ JsonProperty ( "timestamp" ) ]
18+ public DateTime Timestamp { get ; set ; }
19+
20+ [ JsonProperty ( "itemID" ) ]
21+ public int ItemId { get ; set ; }
22+
23+ [ JsonProperty ( "wrenchNumber" ) ]
24+ public int WrenchNumber { get ; set ; }
25+ }
26+
27+ public class GoldenWrenchResult
28+ {
29+ [ JsonProperty ( "wrenches" ) ]
30+ public IList < GoldenWrench > GoldenWrenches { get ; set ; }
31+ }
32+
33+ public class GoldenWrenchResultContainer
34+ {
35+ [ JsonProperty ( "results" ) ]
36+ public GoldenWrenchResult Result { get ; set ; }
37+ }
38+ }
Original file line number Diff line number Diff line change 6262 <Compile Include =" SteamWebInterface.cs" />
6363 <Compile Include =" SteamWebRequest.cs" />
6464 <Compile Include =" SteamWebRequestParameter.cs" />
65+ <Compile Include =" TFItems.cs" />
6566 <Compile Include =" Utilities\SteamIdExtensions.cs" />
6667 </ItemGroup >
6768 <ItemGroup >
Original file line number Diff line number Diff line change 1+ using SteamWebAPI2 . Models ;
2+ using System ;
3+ using System . Collections . Generic ;
4+ using System . Collections . ObjectModel ;
5+ using System . Linq ;
6+ using System . Text ;
7+ using System . Threading . Tasks ;
8+
9+ namespace SteamWebAPI2
10+ {
11+ public class TFItems : SteamWebInterface
12+ {
13+ public TFItems ( string steamWebApiKey )
14+ : base ( steamWebApiKey , "ITFItems_440" )
15+ {
16+ }
17+
18+ public async Task < IReadOnlyCollection < GoldenWrench > > GetGoldenWrenchesAsync ( )
19+ {
20+ var goldenWrenchesResult = await CallMethodAsync < GoldenWrenchResultContainer > ( "GetGoldenWrenches" , 2 ) ;
21+ return new ReadOnlyCollection < GoldenWrench > ( goldenWrenchesResult . Result . GoldenWrenches ) ;
22+ }
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments