Create searchGamesWithMinimumReviews function
This commit is contained in:
parent
ed903796f1
commit
2406b50270
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue