Skip to content

Commit

Permalink
Updated WebAPI sample
Browse files Browse the repository at this point in the history
  • Loading branch information
azuisleet committed Apr 27, 2019
1 parent 473b171 commit 6bb5554
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Samples/6.WebAPI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,15 @@ static void Main( string[] args )
// you can call interface functions through a Call method
using ( WebAPI.Interface steamNews = WebAPI.GetInterface( "ISteamNews" ) )
{
Dictionary<string, string> newsArgs = new Dictionary<string,string>();
Dictionary<string, object> newsArgs = new Dictionary<string,object>();
newsArgs[ "appid" ] = "440";

KeyValue results = steamNews.Call( "GetNewsForApp", /* version */ 1, newsArgs );

foreach ( KeyValue news in results[ "newsitems" ][ "newsitem" ].Children )
{
Console.WriteLine( "News: {0}", news[ "title" ].AsString() );
}
}
}
}
Expand Down

0 comments on commit 6bb5554

Please sign in to comment.