mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: flesh out popular tanks
This commit is contained in:
1 parent
b6c4c4e852
commit
406ad52c8d
10 files changed
+85
-30
No files matched your search
@@ -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,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",
|
||||
);
|
||||
Reference in new issue
Block a user