backfill command and minor fixes
This commit is contained in:
@@ -116,6 +116,27 @@ class IgdbService
|
||||
");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get games for backfill — broader filter than getPopularGames.
|
||||
*/
|
||||
public function getPopularGamesForBackfill(int $limit = 500, int $offset = 0, int $minRatings = 5): array
|
||||
{
|
||||
return $this->query('games', "
|
||||
fields id,name,slug,summary,cover.image_id,first_release_date,
|
||||
genres.id,genres.name,genres.slug,
|
||||
platforms.id,platforms.name,platforms.slug,platforms.abbreviation,
|
||||
involved_companies.company.id,involved_companies.company.name,
|
||||
involved_companies.company.slug,involved_companies.developer,
|
||||
involved_companies.publisher,
|
||||
screenshots.image_id,
|
||||
rating,rating_count;
|
||||
where rating != null & rating_count > {$minRatings} & cover != null;
|
||||
sort rating_count desc;
|
||||
limit {$limit};
|
||||
offset {$offset};
|
||||
");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get recently released games.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user