@theedeer0/battlemetrics-api
v1.0.12
Published
An object-oriented BattleMetrics API wrapper for Node.js developers with TypeScript support.
Downloads
13
Maintainers
Readme
BattleMetrics-API
This is a robust, TypeScript-supported BattleMetrics API wrapper. It leverages the power of Promises for efficient and readable asynchronous operations, providing a seamless interface for interacting with the BattleMetrics API.
This package is still heavily under development and is missing a lot of the availible BattleMetrics API endpoints
Support
Support is offered through direct messages on discord (theedeer) or in my discord server
Installation
This module is designed for Node.js.
To install the module, use the following command in your terminal:
npm i @theedeer0/battlemetrics-api --save
After installation, you can import and use the module in your project.
If you're using TypeScript, import the module like this:
import BattleMetrics from '@theedeer0/battlemetrics-api'
const bmAPI = new BattleMetrics('BM-TOKEN')
If you're using CommonJS, require the module like this:
const BattleMetrics = require('@theedeer0/battlemetrics-api')
const bmAPI = new BattleMetrics('BM-TOKEN')
Remember to replace BM-TOKEN
with your actual BattleMetrics API token, which can be obtained here
Example Use
import BattleMetrics, { Player } from '@theedeer0/battlemetrics-api';
bmAPI.getPlayerById('123').then(response => {
const player: Player = response;
console.log(player);
})