Skip to content

Auo/dota2-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dota2-api

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.

Supported API methods

  • GetHeroes
  • GetMatchHistory
  • GetMatchDetails
  • GetLeagueListings
  • GetLiveLeagueGames
  • GetTeamInfoById -currently not working
  • GetTournamentPrizePool
  • GetPlayerSummary

Additional methods

These two methods will call the Steam CDN for images and download them.

  • GetHeroPortrait - Will return a byte[] of a .png or .jpg image depending on choices.
  • GetItemIcon - Will return a byte[] of a .png image

Usage

Import the namespace

using Dota2Api

Then use the class!

  using (ApiHandler handler = new ApiHandler("API-KEY-HERE"))
  {
    var matchResult = await handler.GetMatchHistory();
  }

Work left

Some restructuring and renaming might be good

  • Extract HTTP methods from ApiHandler
  • Extract QueryBuilder from ApiHandler
  • Fix GetTeamInfoById or remove it

Releases

No releases published

Packages

No packages published

Languages