battlemetrics-client
Version:
TypeScript client library for the BattleMetrics API
96 lines (59 loc) ⢠3.01 kB
Markdown
# battlemetrics-client
[](https://github.com/hizenxyz/battlemetrics-client/actions)
[](https://badge.fury.io/js/battlemetrics-client)
[](https://opensource.org/licenses/MIT)
[](https://www.typescriptlang.org/)
TypeScript client library for the [BattleMetrics API](https://www.battlemetrics.com/developers).
BattleMetrics provides game server monitoring, player tracking, and admin tools for popular games like Rust, Ark, CS2, and more.
ā ļø **Note**: This is a partial implementation focused on specific BattleMetrics API endpoints. If you need additional endpoints that aren't currently supported, please [open an issue](https://github.com/hizenxyz/battlemetrics-client/issues) or submit a pull request!
The project is designed to be easily extensible, and I'm happy to help guide contributions for new features. Feel free to reach out if you'd like to add support for specific endpoints.
## Installation
```bash
npm install battlemetrics-client
```
## Quick Start
Set your BattleMetrics API token as an environment variable:
```bash
export BATTLEMETRICS_TOKEN="your-api-token-here"
```
Basic usage:
```typescript
import { getGameList, getGameInfo } from "battlemetrics-client";
// Get all games
const games = await getGameList();
// Get specific game info
const arkInfo = await getGameInfo("ark");
```
## Documentation
š **[Full Usage Guide](USAGE.md)** - Comprehensive examples and API reference for all implemented resources.
## API Reference
For full API documentation, see the [BattleMetrics API docs](https://www.battlemetrics.com/developers/documentation).
### Authentication
Get your API token from [BattleMetrics](https://www.battlemetrics.com/developers).
## Features
- Full TypeScript support
- BattleMetrics API coverage
- Modern ES modules
- Comprehensive error handling
## Development
```bash
# Install dependencies
npm install
# Run tests
npm test
# Run linting
npm run lint
# Build project
npm run build
```
## Contributing
This project welcomes contributions! If you'd like to add support for additional BattleMetrics API endpoints or improve existing functionality, please:
1. Check the [existing issues](https://github.com/hizenxyz/battlemetrics-client/issues) to see if your feature is already being worked on
2. Open an issue to discuss the proposed changes
3. Submit a pull request with your implementation
I'm happy to help guide you through the contribution process and provide assistance with implementation details.
## Support
If you find this project helpful, consider supporting me on [Ko-fi](https://ko-fi.com/hizenxyz) ā
## License
MIT License. See [LICENSE](LICENSE) for details.
Created by [hizenxyz](https://github.com/hizenxyz).