Create searchGamesWithMinimumReviews function

This commit is contained in:
baz 2023-11-28 22:05:29 +00:00
parent ed903796f1
commit 2406b50270
1 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,15 @@ module.exports = {
}, },
}; };
async function searchGamesWithMinimumReview(gamename) {
let body = `search "${gamename}"; `;
body = await body.concat('fields *; limit 25; where (category = 0 | category = 4) & version_parent = null & total_rating_count > 0;');
const games = await getGameJson(body);
return games;
}
async function getGameJson(body) { async function getGameJson(body) {
let res; let res;