mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-08-19 23:24:11 -05:00
Add stages.json
This commit is contained in:
@@ -4,6 +4,7 @@ import CoopUpdater from "./updaters/CoopUpdater.mjs";
|
||||
import FestivalUpdater from "./updaters/FestivalUpdater.mjs";
|
||||
import { regionTokens } from "../splatnet/NsoClient.mjs";
|
||||
import XRankUpdater from "./updaters/XRankUpdater.mjs";
|
||||
import StagesUpdater from "./updaters/StagesUpdater.mjs";
|
||||
|
||||
function updaters() {
|
||||
const tokens = regionTokens();
|
||||
@@ -16,6 +17,7 @@ function updaters() {
|
||||
tokens.EU && new FestivalUpdater('EU'),
|
||||
tokens.JP && new FestivalUpdater('JP'),
|
||||
tokens.AP && new FestivalUpdater('AP'),
|
||||
new StagesUpdater,
|
||||
].filter(u => u);
|
||||
}
|
||||
|
||||
|
||||
25
app/data/updaters/StagesUpdater.mjs
Normal file
25
app/data/updaters/StagesUpdater.mjs
Normal file
@@ -0,0 +1,25 @@
|
||||
import DataUpdater from "./DataUpdater.mjs";
|
||||
|
||||
export default class StagesUpdater extends DataUpdater
|
||||
{
|
||||
name = 'Stages';
|
||||
filename = 'stages';
|
||||
|
||||
imagePaths = [
|
||||
'$..image.url',
|
||||
'$..originalImage.url',
|
||||
];
|
||||
|
||||
localizations = [
|
||||
{
|
||||
key: 'stages',
|
||||
nodes: '$..stageRecords.nodes.*',
|
||||
id: 'id',
|
||||
values: 'name',
|
||||
},
|
||||
];
|
||||
|
||||
getData(locale) {
|
||||
return this.splatnet(locale).getStageRecordData();
|
||||
}
|
||||
}
|
||||
@@ -120,6 +120,10 @@ export default class SplatNet3Client
|
||||
return this.getGraphQLPersistedQuery(1, '011e394c0e384d77a0701474c8c11a20');
|
||||
}
|
||||
|
||||
getStageRecordData() {
|
||||
return this.getGraphQLPersistedQuery(1, 'f08a932d533845dde86e674e03bbb7d3');
|
||||
}
|
||||
|
||||
getGesotownData() {
|
||||
return this.getGraphQLPersistedQuery(1, 'a43dd44899a09013bcfd29b4b13314ff');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user