mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-07-17 10:13:13 -05:00
Get detailed data for each Splatfest
This commit is contained in:
parent
0820c07be7
commit
c2df39acea
|
|
@ -10,8 +10,18 @@ export default class FestivalUpdater extends DataUpdater
|
|||
'$..image.url',
|
||||
];
|
||||
|
||||
getData() {
|
||||
return this.splatnet.getFestRecordData();
|
||||
async getData() {
|
||||
let result = await this.splatnet.getFestRecordData();
|
||||
|
||||
// Get the detailed data for each Splatfest
|
||||
// TODO: Implement caching for past Splatfests to reduce the number of requests needed.
|
||||
for (let node of result.data.festRecords.nodes) {
|
||||
let detailResult = await this.splatnet.getFestDetailData(node.id);
|
||||
|
||||
Object.assign(node, detailResult.data.fest);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async formatDataForWrite(data) {
|
||||
|
|
|
|||
|
|
@ -128,4 +128,8 @@ export default class SplatNet3Client
|
|||
getFestRecordData() {
|
||||
return this.getGraphQLPersistedQuery(1, '44c76790b68ca0f3da87f2a3452de986');
|
||||
}
|
||||
|
||||
getFestDetailData(festId) {
|
||||
return this.getGraphQLPersistedQuery(1, '2d661988c055d843b3be290f04fb0db9', { festId });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user