npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

corehalla

v0.2.9

Published

Brawlhalla API Wrapper for Node.js, provided by corehalla.com.

Downloads

11

Readme

Brawlhalla API Wrapper for Node.js

Useful links

Brawlhalla API & Keys info: dev.brawlhalla.com

Corehalla: corehalla.com

Installation

Install via npm:

$ npm i corehalla

Import the module and connect using your api key:

const bh_api = require('corehalla')('API_KEY');

Methods

Corehalla's JSON Format

All methods listed below return custom parsed JSON, easier to use than Brawlhalla's default API JSON format.

Docs on Corehalla's JSON format are being written and will be released soon

// Custom format methods
fetchLeaderboardFormat(options)
fetchPlayerStatsFormat(brawlhalla_id)
fetchClanStatsFormat(clan_id)
search2v2Teams(player_name, region, maxPlayers)

Leaderboard

.fetchLeaderboard(options) Uses One Brawlhalla API Call

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

bh_api.fetchLeaderboard(options).then(leaderboard => {

})
.catch(err => console.log(err));

.fetchLeaderboardFormat(options) Uses One Brawlhalla API Call

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

bh_api.fetchLeaderboardFormat(options).then(leaderboard => {

})
.catch(err => console.log(err));

Player

.findPlayer(player_name, options) Uses One Brawlhalla API Call

var options = {
	perfect_match: false,
	unique: false
}

bh_api.findPlayer('player_name', options).then(player => {

})
.catch(err => console.log(err));

.findPlayerBySteamID(steam_id) Uses One Brawlhalla API Call

bh_api.findPlayerBySteamID('steam_id').then(player => {

})
.catch(err => console.log(err));

.fetchPlayerStats(brawlhalla_id) Uses One Brawlhalla API Call

bh_api.fetchPlayerStats('brawlhalla_id').then(player_stats => {

})
.catch(err => console.log(err));

.fetchPlayerRanked(brawlhalla_id) Uses One Brawlhalla API Call

bh_api.fetchPlayerRanked('brawlhalla_id').then(player_ranked => {

})
.catch(err => console.log(err));

.fetchPlayerStatsFormat(brawlhalla_id) Uses Two Brawlhalla API Calls

bh_api.fetchPlayerStatsFormat('brawlhalla_id').then(player_stats => {
	// Formatted General and Ranked player stats for easier use
})
.catch(err => console.log(err));

Clan

.fetchClanStats(clan_id) Uses One Brawlhalla API Call

bh_api.fetchClanStats('clan_id').then(clan_stats => {

})
.catch(err => console.log(err));

.fetchClanStatsFormat(clan_id) Uses One Brawlhalla API Call

bh_api.fetchClanStatsFormat('clan_id').then(clan_stats => {
	// Formatted clan stats for easier use
})
.catch(err => console.log(err));

Static Data

.fetchStaticLegendData(legend_id) Uses One Brawlhalla API Call

// if legend_id is left blank, or is undefined,
// will return static data for all legends.
bh_api.fetchStaticLegendData('legend_id').then(data => {

})
.catch(err => console.log(err));

2v2 Search (Beta)

.search2v2Teams(player_name, region, maxPlayers) Uses (1+maxPlayers) Brawlhalla API Call

bh_api.search2v2Teams('player_name', 'region', maxPlayers).then(teams => {
	
})
.catch(err => console.log(err));