2.0.4 ā€¢ Published 2 years ago

opendota.js v2.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

opendota.js

Version License

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

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2021 Will Lamason.

This project is Apache License 2.0 licensed.