parent
3f31bc7ea9
commit
009e87d4ab
|
|
@ -70,7 +70,8 @@
|
|||
},
|
||||
"npm": {
|
||||
"specifiers": {
|
||||
"mongodb": "mongodb@5.1.0"
|
||||
"mongodb": "mongodb@5.1.0",
|
||||
"splatnet3-types": "splatnet3-types@0.2.20230227204004"
|
||||
},
|
||||
"packages": {
|
||||
"@types/node@18.14.2": {
|
||||
|
|
@ -143,6 +144,10 @@
|
|||
"memory-pager": "memory-pager@1.5.0"
|
||||
}
|
||||
},
|
||||
"splatnet3-types@0.2.20230227204004": {
|
||||
"integrity": "sha512-FAY6pbUcrp5O8c49BNXSKxoyM3UlCrRx2AtA9Y3qlvqOLdHqwxtzcdzbk1b1hRam8ZcrxRzE/ii6ESRiPIAnZw==",
|
||||
"dependencies": {}
|
||||
},
|
||||
"tr46@3.0.0": {
|
||||
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
|
||||
|
||||
export const AGENT_NAME = "splashcat / s3si.ts";
|
||||
export const AGENT_VERSION = "1.0.1";
|
||||
export const AGENT_VERSION = "1.1.0";
|
||||
export const S3SI_VERSION = "0.3.1";
|
||||
export const COMBINED_VERSION = `${AGENT_VERSION}/${S3SI_VERSION}`;
|
||||
export const NSOAPP_VERSION = "2.5.0";
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import {
|
|||
ExportResult,
|
||||
Game,
|
||||
GameExporter,
|
||||
Queries,
|
||||
RespMap,
|
||||
Summary,
|
||||
VsHistoryDetail,
|
||||
} from "../types.ts";
|
||||
|
|
@ -110,4 +112,21 @@ export class MongoDBExporter implements GameExporter {
|
|||
status: "success",
|
||||
};
|
||||
}
|
||||
|
||||
async exportStages(stages: RespMap[Queries.StageRecordQuery]["stageRecords"]["nodes"]): Promise<ExportResult> {
|
||||
|
||||
for (const stage of stages) {
|
||||
await this.mongoDb.collection("stages").updateOne({
|
||||
"stage.id": stage.id,
|
||||
}, {
|
||||
$set: stage,
|
||||
}, {
|
||||
upsert: true,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
status: "success",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue