brawlhalla.js

0.0.25 • Public • Published

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: ''
}

Package Sidebar

Install

npm i brawlhalla.js

Weekly Downloads

10

Version

0.0.25

License

ISC

Unpacked Size

8.43 kB

Total Files

4

Last publish

Collaborators

  • alfiegoldson