@invulnerable: You're most of the way there.
One issue is that the "name:battlefield3" filter won't ever return results. The there's a space between "battlefield" and "3" in the database, so you'd need to do "name:battlefield%203".
The other issue is that, per the API documentation, expected_release_year will be empty if original_release_date is set. I thought I was going to have to recommend using two queries--one for released games and another for unreleased ones--but it appears that the API will accept a request like:
http://www.giantbomb.com/api/games/?api_key=API_KEY&filter=expected_release_year:2013,original_release_date:2013-01-01%2000:00:00|2013-12-31%2023:59:59,name:battlefield%203&format=json&limit=5&sort=original_release_date:asc
In this case that still won't return any results, but that's only because Battlefield 3 came out in 2011. If you change the request like so:
http://www.giantbomb.com/api/games/?api_key=API_KEY&filter=expected_release_year:2011,original_release_date:2011-01-01%2000:00:00|2011-12-31%2023:59:59,name:battlefield%203&format=json&limit=5&sort=original_release_date:asc
...you'll get one hit.
Hope that helps!
Log in to comment