mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-04-23 01:57:58 -05:00
Add "current festival" data updater just in case
This commit is contained in:
parent
aade7532d6
commit
2e1136852b
|
|
@ -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'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
21
app/data/updaters/CurrentFestivalUpdater.mjs
Normal file
21
app/data/updaters/CurrentFestivalUpdater.mjs
Normal 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();
|
||||
}
|
||||
}
|
||||
|
|
@ -132,4 +132,8 @@ export default class SplatNet3Client
|
|||
getFestDetailData(festId) {
|
||||
return this.getGraphQLPersistedQuery(1, '2d661988c055d843b3be290f04fb0db9', { festId });
|
||||
}
|
||||
|
||||
getCurrentFestData() {
|
||||
return this.getGraphQLPersistedQuery(1, 'c0429fd738d829445e994d3370999764');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user