opendota-api
Version:
Wrapper from opendota
54 lines (38 loc) • 891 B
Markdown
```js
const Dota = require('opendota-api');
let dota = new Dota();
```
Return all dota 2 heroes with identifier.
// With Async/await functions
```js
async function list() {
let heroes = await dota.listHeroes();
console.log(heroes);
// doStuff
}
```
// Without Async/await functions
```js
dota.listHeroes()
.then(function(response) {
console.log(response);
// Dostuff
})
.catch(function(err) {
console.log(err);
});
```
options ->
setnames : boolean
account_id: string
setnames = assign name heroes in results instead identifiers
Feel free to send your issues here