docs(api): improve api documentation (#3343)

This commit is contained in:
ReenigneArcher 2024-10-30 16:34:18 -04:00 committed by GitHub
commit ec0cdcf0fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 213 additions and 10 deletions

View file

@ -506,12 +506,12 @@
if (dotIndex < 0 || slashIndex < 0) {
return null;
}
const hash = thumb.substring(slashIndex + 1, dotIndex);
const slug = thumb.substring(slashIndex + 1, dotIndex);
return {
name: game.name,
key: "igdb_" + game.id,
url: "https://images.igdb.com/igdb/image/upload/t_cover_big/" + hash + ".jpg",
saveUrl: "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/" + hash + ".png",
key: `igdb_${game.id}`,
url: `https://images.igdb.com/igdb/image/upload/t_cover_big/${slug}.jpg`,
saveUrl: `https://images.igdb.com/igdb/image/upload/t_cover_big_2x/${slug}.png`,
}
}).filter(item => item));
}