A minimalistic wrapper for the opendota api.
npm install opendota.js
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();
- 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.
Documentation can be found in DOCS.md.
Please use the issues tab above.
npm run test
npm run docs
npm run types
๐ค Will Lamason
Give a โญ๏ธ if this project helped you!
Copyright ยฉ 2021 Will Lamason.
This project is Apache License 2.0 licensed.