JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q5329F
  • License ISC

Brawlhalla API Tool

Package Exports

  • brawlhalla.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (brawlhalla.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Brawlhalla API Tool

Node.JS wrapper for the Brawlhalla API

Installation

Install via npm:

$ npm install --save brawlhalla.js

Import the module into your script:

const bh_api = require('brawlhalla.js');

Connect to the api with your personnal key:

bh_api.login('API KEY');

Methods

.getPlayerStats(playerID) Uses One Brawlhalla API Call

bh_api.getPlayerStats(playerID).then(player => {

}).catch(function(error){

});

.getPlayerRank(playerID) Uses One Brawlhalla API Call

bh_api.getPlayerRank(playerID).then(player => {

}).catch(function(error){

});

.getClanStats(clanID) Uses One Brawlhalla API Call

bh_api.getClanStats(clanID).then(clan => {

}).catch(function(error){

});

.getRankings(options) Uses One Brawlhalla API Call

bh_api.getRankings(options).then(rankings => {

}).catch(function(error){

});

Option object and properties are all optional. By default:

options = {
    bracket: '1v1', // '1v1' or '2v2'
    region: 'all', // 'all', 'us-e', 'us-w', 'eu', 'brz', 'aus', 'sea'
    page: 1,
    name: ''
}