1.3.1 • Published 10 months ago
@lejeunerenard/ballchasing-api v1.3.1
ballchasing.com API Client
A Typescript client library for querying ballchasing.com built using Effect.
Usage
import { getClient } from '@lejeunerenard/ballchasing-api/easy'
const client = await getClient('YOUR_AUTH_KEY')
// Single Group
const group = await client.groups.get('2v2-w-scott-2023-12-20-kunazcz10y')
console.log('Single group', group)
// Group List
const groups = await client.groups.list({
creator: '76561197987055788' // SteamID
})
console.log('Groups', groups)
// Replay list
const meId = 'epic:9152ab3ef0bd44b59de47ca639ca7010'
const replays = await client.replays.list({
uploader: 'me',
'player-id': [meId]
})
console.log('Replays', replays)
// Single Replay
const replay = await client.replays.get('bdc27caf-fe82-4708-9f48-4f2561f93313')
console.log('Replay', replay)TODO
- Add automatic rate limiting based on Patreon tier
- Add parallel request support
Endpoints
| Method | URL | Doc Link | |
|---|---|---|---|
GET | / | Ping | |
POST | /v2/upload | Upload | |
| X | GET | /replays | List/Filter replays |
| X | GET | /replays/${id} | Get a specific replay |
DELETE | /replays/${id} | Delete a replay | |
PATCH | /replays/${id} | Path a replay | |
GET | /replays/${id}/file | Download replay file | |
POST | /groups | Create a group | |
| X | GET | /groups | List/Filter groups |
| X | GET | /groups/${id} | Get a specific group |
DELETE | /groups/${id} | Delete a group | |
PATCH | /groups/${id} | Patch a group | |
GET | /maps | Maps |