Files
blitzkit/packages/core/src/blitz/getTankStats.ts
T

16 lines
394 B
TypeScript
Raw Normal View History

2025-10-13 23:20:26 -05:00
import type { TanksStats } from "../types";
import { type FetchBlitzParams, fetchBlitz } from "./fetchBlitz";
import type { Region } from "./regions";
2024-09-08 10:11:24 -05:00
export async function getTankStats(
2024-04-28 19:16:08 -05:00
region: Region,
id: number,
2025-10-12 15:05:58 +00:00
params?: FetchBlitzParams
2024-04-28 19:16:08 -05:00
) {
2025-10-12 15:05:58 +00:00
const tankStats = await fetchBlitz<TanksStats>(region, "tanks/stats", {
2024-04-15 13:19:25 -05:00
account_id: id,
2024-04-28 19:16:08 -05:00
...params,
2024-04-15 13:19:25 -05:00
});
return tankStats[id];
}