Skip to content

jiin/dota2api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dota2

About

Dota2 api wrapper written in node.js

Installation

Install this version via git:

npm install git://github.com/jiin/dota2api

And use in your node source:

var Dota2Api = require('dota2api');

Usage

Initialization

var dota = new Dota2Api('your api key');

To obtain api key go to http://steamcommunity.com/dev/apikey

Match Details

Get match details from match id:

dota.getMatchDetails('match_id', function (err, res) {
  // ...
});

Get matches between two dates:

dota.getByDate({
  from: 'your date in unix timestamp'
  to: 'your date in unix timestamp'
}, function (err, res) {
  // ...
});

You can also use this function with Date object:

dota.getByDate({
  from: new Date("24 July 2013"),
  to: new Date()
}, function (err, res) {
  // ...
});

Match History

Get matches by player name:

dota.getByPlayerName('Na`Vi Dendi', function (err, res) {
    // ...
});

Get matches by hero id:

dota.getByHeroID(12, function (err, res) {
    // ...
});

Get matches by league id:

dota.getByLeague(156, function (err, res) {
    // ...
});

Get matches by steam account id:

dota.getByAccountID(1234, function (err, res) {
    // ...
});

Heroes

Get dota2 heroes list:

dota.getHeroes(function (err, res) {
    // ...
});

Replay

Get replay url:

dota.getReplayUrl('my.cool.cluster', 'my_match_id', 'my_replay_salt');
// return url

About

    Copyright (C) 2013  <[email protected]>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

About

Dota2 api wrapper written in node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published