@barbarbar338/bhapi
v1.2.0
Published
Brawlhalla API wrapper for NodeJS and web
Maintainers
Readme
Brawlhalla API Wrapper
Brawlhalla API JavaScript/TypeScript/NodeJS wrapper. Easily make API requests to Brawlhalla API servers.
📦 Installation
- Using yarn:
yarn add @barbarbar338/bhapi - Using npm:
npm i @barbarbar338/bhapi
🤓 Usage
See the documentation for more examples.
import { BHAPIError, getStatsByBHID, setApiKey } from "@barbarbar338/bhapi";
// Set your Brawlhalla API key
setApiKey("YOUR_BRAWLHALLA_API_KEY");
try {
// Fetch stats using Brawlhalla user ID
const { data } = await getStatsByBHID("brawlhalla_id");
console.log(data);
} catch (error) {
if (error instanceof BHAPIError) {
console.error("Brawlhalla API error:", error);
} else {
console.error("Unknown error:", error);
}
}📄 License
Copyright © 2025 Barış DEMİRCİ.
Distributed under the MIT License. See LICENSE for more information.
🧦 Contributing
Feel free to use GitHub's features.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/my-feature) - Run prettier and eslint (
npm run format && npm run lint) - Commit your Changes (
git commit -m 'my awesome feature my-feature') - Push to the Branch (
git push origin feature/my-feature) - Open a Pull Request
🔥 Show your support
Give a ⭐️ if this project helped you!
📞 Contact
- Mail: [email protected]
- Website: https://338.rocks
- Discord: https://discord.gg/BjEJFwh
- Instagram: https://www.instagram.com/ben_baris.d/
