php-giantbomb icon indicating copy to clipboard operation
php-giantbomb copied to clipboard

Query by relationship

Open PiousVenom opened this issue 3 years ago • 1 comments

If I want to do a query for games on a specific platform, how would that be?

PiousVenom avatar Jul 06 '21 02:07 PiousVenom

Hey @PiousVenom,

this library is a simple layer on top of the actual API, so their docs are a good resource for your needs.

For your query, I believe this is the right approach:

$query = DBorsatto\GiantBomb\Query::create()
    ->addFilterBy('platforms', 'PS4,PS5'); // You might want to experiment with casing, I'm not sure
$games = $client->find('Game', $query);

dborsatto avatar Jul 06 '21 10:07 dborsatto