Skip to content

Magnusfarje/dota2api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async C# wrapper for the dota 2 match history api

Get api key for steam here

Api doc

GetMatchHistory(dota2api.Models.MatchHistoryQuery?)

Returns match history. MatchHistoryQuery properties:
player_name Search matches with a player name, exact match only
hero_id Search for matches with a specific hero being played, hero id's are in dota/scripts/npc/npc_heroes.txt in your Dota install directory
skill 0 for any, 1 for normal, 2 for high, 3 for very high skill
date_min date in UTC seconds since Jan 1, 1970 (unix time format)
account_id Steam account id (this is not SteamID, its only the account number portion)
league_id matches for a particular league
start_at_match_id Start the search at the indicated match id, descending
matches_requested Defaults is 100? matches, this can limit to less

Usage:

using dota2api;
...

public async void CallApi(){
var dota2api = new Dota2Api("<key>");

// returns last 100 matches played.
var resultModel = await dota2api.GetMatchHistory();  

// return last match where given accountid played.
var resultModel = await dota2api.GetMatchHistory(new MatchHistoryQuery(){ 
      account_id = 1233322,
      matches_requested = 1,
      });                                             
}

GetMatchDetails(int)

Returns match details.

Usage:

using dota2api;
...

public async void CallApi(){
var dota2api = new Dota2Api("<key>");

// returns match details.
var resultModel = await dota2api.GetMatchDetails(1233322);  

Download

[dota2api.dll](https://github.com/Magnusfarje/dota2api/blob/master/dota2api/bin/Release/dota2api.dll?raw=true)

About

Dota 2 api C# wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages