This is a C# wrapper for the Dota 2 api, it's packaged as a net-standard library.
To get this working, you need an API key from valve.
Then edit the App.config
file in the Test project and you can run the tests.
GetHeroes
GetMatchHistory
GetMatchDetails
GetLeagueListings
GetLiveLeagueGames
-currently not workingGetTeamInfoById
GetTournamentPrizePool
GetPlayerSummary
These two methods will call the Steam CDN for images and download them.
GetHeroPortrait
- Will return abyte[]
of a .png or .jpg image depending on choices.GetItemIcon
- Will return abyte[]
of a .png image
Import the namespace
using Dota2Api
Then use the class!
using (ApiHandler handler = new ApiHandler("API-KEY-HERE"))
{
var matchResult = await handler.GetMatchHistory();
}
Some restructuring and renaming might be good
- Extract HTTP methods from ApiHandler
- Extract QueryBuilder from ApiHandler
- Fix
GetTeamInfoById
or remove it