feat: flesh out popular tanks

This commit is contained in:
TrèsAbhi committed 2026-03-15 22:37:46 -05:00
1 parent b6c4c4e852
commit 406ad52c8d
10 files changed
+85 -30

No files matched your search

+10 -1
View File
@@ -1,9 +1,10 @@
import { fetchPB } from "@blitzkit/core";
import type { Strings } from "@blitzkit/i18n";
import { Avatars } from "../../protos/avatars";
import { PopularTanks } from "../../protos/popular_tanks";
import { Tank } from "../../protos/tank";
import { AbstractAPI } from "./abstract";
//@ts-expect-error
export class ClientAPI extends AbstractAPI {
protected _avatars() {
return fetchPB("/api/avatars/all.pb", Avatars);
@@ -24,4 +25,12 @@ export class ClientAPI extends AbstractAPI {
const json = (await response.json()) as Strings;
return json;
}
protected _popularTanks() {
return fetchPB("/api/tanks/popular.pb", PopularTanks);
}
protected _tank(id: string) {
return fetchPB(`/api/tanks/${id}.pb`, Tank);
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { GameInterface } from "@blitzkit/game";
export const game = new GameInterface(
"/mnt/c/Program Files (x86)/Steam/steamapps/common/World of Tanks Blitz Playtest",
"C:/Program Files (x86)/Steam/steamapps/common/World of Tanks Blitz Playtest",
);