Let's address these questions one at a time:
How do I filter by genre, what would the query look like?
You need to filter by the ID of the genre you want. To get these IDs, you can pull the list from the genres resource:
http://www.giantbomb.com/api/genres/?format=json&api_key=YOUR_API_KEY
In the case of FPS, the ID is 32. So, now you'll filter the games resource based on that ID:
http://www.giantbomb.com/api/games/?format=json&api_key=YOUR_API_KEY&filter=genres:32
The same basic principle of filtering by ID works in many other cases too.
EDIT: Unfortunately upon testing that, genres only shows up for a single game and not in the collection. I guess maybe you need to ask someone like @frobie, @mrpibb about possibly adding it.
How do I filter by release date, I.E. in a range, "between 1980 and 1990"?
Again, you should use filter, with a pipe between the two desired date values. You'll also likely want to use sort so that your results are in some logical order:
http://www.giantbomb.com/api/games/?format=json&api_key=YOUR_API_KEY&filter=original_release_date:1980-1-1 00:00:00|1990-1-1 00:00:00&sort=original_release_date:asc
How do I filter by giantbomb rating, I.E. "above 3 stars"?
I think the only way you can handle this is to filter on the reviews resource rather than games, and I'm not sure if it's possible to do a range.
Also, take note that review scores are identified by their percentage value out of 100 (i.e. one star = 20, two stars = 40, etc.)
Here's an example for getting all three star reviews:
http://www.giantbomb.com/api/reviews/?format=json&api_key=YOUR_API_KEY&filter=score:60
How do I filter by whether or not GiantBomb has any videos uploaded for that game?
I'm not sure that you're going to be able to do this filtering in the API call. You'll likely need to handle this filtering on your end. Also, the videos resource isn't appearing in results pulled from the games resource (the same issue noted above).
Log in to comment