Curse345 / BattleMetricsAPI

2 stars 2 forks source link

BattleMetricsAPI

BattleMeticsAPI is an easy and open source NPM Package that allows you to do a variety of functions within BattleMetrics but much easier!

Getting Started!

Installation

This is a Node.js module.

Before installing, download and install Node.js.

const Battlemetric = require('battlemetricsapi')
npm i battlemetricsapi --save

Getting your API Key

You must generate an API Key from Battlemetrics. Then you must call the following function:

Battlemetrics.login({
    token: 'Bearer Token'
})

Example Usage

const BattleMetrics = require("battlemetricsapi");

BattleMetrics.getServerInfoByName("Raid Simulator", "rust").then(res => {
    console.log(res)
});

BattleMetrics.getBanInfo("BanID").then(res => {
    console.log(res)
});

BattleMetrics.login({
    token: 'Bearer Token'
})