mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
17 lines
394 B
TypeScript
17 lines
394 B
TypeScript
import type { TanksStats } from "../types";
|
|
import { type FetchBlitzParams, fetchBlitz } from "./fetchBlitz";
|
|
import type { Region } from "./regions";
|
|
|
|
export async function getTankStats(
|
|
region: Region,
|
|
id: number,
|
|
params?: FetchBlitzParams
|
|
) {
|
|
const tankStats = await fetchBlitz<TanksStats>(region, "tanks/stats", {
|
|
account_id: id,
|
|
...params,
|
|
});
|
|
|
|
return tankStats[id];
|
|
}
|