backfill command and minor fixes

This commit is contained in:
Doar Mihai
2026-05-31 16:14:40 +03:00
parent b99ad721da
commit ea3e226398
5 changed files with 221 additions and 90 deletions
+21
View File
@@ -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.
*/