From a001e6210254e1a0726e5404da3f590684244b46 Mon Sep 17 00:00:00 2001 From: Gamebrary Date: Thu, 4 Mar 2021 10:14:02 -0700 Subject: [PATCH] add collections to game query --- functions/index.js | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/functions/index.js b/functions/index.js index 69f32f67..b92611ef 100755 --- a/functions/index.js +++ b/functions/index.js @@ -203,33 +203,32 @@ exports.game = functions.https.onRequest((req, res) => { res.status(400).send('missing gameId'); } - // TODO: add collection - // collection.*, - // collection.games.*, const data = `fields - name, - summary, + age_ratings.*, + alternative_names.*, + bundles.*, + collection.*, + collection.games.*, cover.image_id, - screenshots.image_id, - player_perspectives.name, + external_games.*, + game_modes.name, + genres.name, involved_companies.company.name, involved_companies.developer, involved_companies.publisher, - release_dates.platform, - release_dates.date, - websites.category, - websites.url, - bundles.*, - alternative_names.*, - age_ratings.*, - videos.video_id, - external_games.*, - similar_games, - rating, - genres.name, - platforms.name, + name, platforms.id, - game_modes.name; + platforms.name, + player_perspectives.name, + rating, + release_dates.date, + release_dates.platform, + screenshots.image_id, + similar_games, + summary, + videos.video_id, + websites.category, + websites.url; where id = ${ gameId };`;