Add "current festival" data updater just in case

This commit is contained in:
Matt Isenhower 2022-09-22 18:33:58 -04:00
parent aade7532d6
commit 2e1136852b
3 changed files with 30 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import GearUpdater from "./updaters/GearUpdater.mjs";
import StageScheduleUpdater from "./updaters/StageScheduleUpdater.mjs";
import CoopUpdater from "./updaters/CoopUpdater.mjs";
import FestivalUpdater from "./updaters/FestivalUpdater.mjs";
import CurrentFestivalUpdater from "./updaters/CurrentFestivalUpdater.mjs";
function updaters() {
return [
@ -12,6 +13,10 @@ function updaters() {
new FestivalUpdater('EU'),
new FestivalUpdater('JP'),
new FestivalUpdater('AP'),
new CurrentFestivalUpdater('US'),
new CurrentFestivalUpdater('EU'),
new CurrentFestivalUpdater('JP'),
new CurrentFestivalUpdater('AP'),
];
}

View File

@ -0,0 +1,21 @@
import DataUpdater from "./DataUpdater.mjs";
export default class CurrentFestivalUpdater extends DataUpdater
{
name = 'Current Festival';
filename = 'currentfest';
constructor(region = null) {
super(region);
this.filename += `.${region}`;
}
imagePaths = [
'$..image.url',
];
getData() {
return this.splatnet.getCurrentFestData();
}
}

View File

@ -132,4 +132,8 @@ export default class SplatNet3Client
getFestDetailData(festId) {
return this.getGraphQLPersistedQuery(1, '2d661988c055d843b3be290f04fb0db9', { festId });
}
getCurrentFestData() {
return this.getGraphQLPersistedQuery(1, 'c0429fd738d829445e994d3370999764');
}
}