@theedeer0/battlemetrics-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

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);
})

Package Sidebar

Install

npm i @theedeer0/battlemetrics-api

Weekly Downloads

28

Version

1.0.12

License

none

Unpacked Size

61.7 kB

Total Files

29

Last publish

Collaborators

  • theedeer0