UNPKG

battlemetrics-client

Version:

TypeScript client library for the BattleMetrics API

15 lines 555 B
import { getClient } from "../client"; import { buildQueryString } from "../utils/buildQueryString"; export async function getGameList(params) { const client = getClient(); const queryString = params ? buildQueryString(params) : ""; const url = queryString ? `/games?${queryString}` : "/games"; const res = await client.get(url); return res.data; } export async function getGameInfo(gameId) { const client = getClient(); const res = await client.get(`/games/${gameId}`); return res.data; } //# sourceMappingURL=games.js.map