2.0.4 ā¢ Published 2 years ago
opendota.js v2.0.4
opendota.js
A minimalistic wrapper for the opendota api.
Install
npm install opendota.js
Example Usage
const { OpenDota } = require("opendota.js");
// Remember to store your api keys safely. I recommend using dotenv.
const opendota = new OpenDota("OPTIONAL_API_KEY");
// Search players by personaname
opendota.search({ q: "noob" }).then(response => console.log(response));
// Get the health of the opendota api service
opendota.getHealth().then(response => console.log(response));
// Using async/await syntax
async function awaitDemo() {
const response = await opendota.search( { q: "noob" } );
console.log(response);
}
awaitDemo();
Features
- Covers 100% of the 54 opendota api endpoints.
- 0 dependencies.
- Fully documented and tested.
- Respects opendota api rate limits.
- Reduces boilerplate calls to opendota api.
Docs
Documentation can be found in DOCS.md.
Reporting Bugs
Please use the issues tab above.
Development - Run tests
npm run test
Development - Generate Docs
npm run docs
Development - Generate Types
npm run types
Author
š¤ Will Lamason
- Website: wmel.us
- Github: @wlamason
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2021 Will Lamason.
This project is Apache License 2.0 licensed.