feat: start of scraping

This commit is contained in:
TrèsAbhi committed 2025-11-28 13:51:17 -06:00
1 parent 4a20102de3
commit ef154f99d5
11 files changed
+73 -19

No files matched your search

+27 -1
View File
@@ -1 +1,27 @@
export class ServerAPI extends AbstractAPI {}
import type { MetadataAccessor } from "@blitzkit/closed";
import type { TanksEntry } from "../../protos/tanks";
import { AbstractAPI } from "./abstract";
export class ServerAPI extends AbstractAPI {
constructor(private metadata: MetadataAccessor) {
super();
console.log(Object.keys(metadata.groups).join("\n"));
}
async tanks() {
const group = this.metadata.group("TankEntity");
const tanks: TanksEntry[] = [];
for (const item of group) {
const tankCatalog = item.TankCatalog();
const id = item.id;
const slug = tankCatalog.name?.value;
tanks.push({ id, slug });
}
return { tanks };
}
}