#1 Edited by elistone (1 posts) -

Im trying to get a list of the new games that have been released using:

http://www.giantbomb.com/api/games/?api_key=[removed]&format=json&sort=original_release_date:desc

but the earlest date it returns is 2008 am I doing something wrong?

Eli

#2 Edited by patrici (2 posts) -

The first entrys with your url are entrys where the original_release_date isnt set. Try to add a filter for this

#3 Edited by lithin (3 posts) -

I've tried to add a filter to my search but nothing really worked. Is there a value for original_release_date such as "set" or "not null" or similar?

Thanks!

#4 Posted by LordAndrew (14426 posts) -

@lithin: Try filter=original_release_date:1700-01-01|2100-12-31.

#5 Posted by hhdivil (1 posts) -

http://www.giantbomb.com/api/games?api_key=REMOVED&format=json&filter=original_release_date:1700-01-01+00%3A00%3A00|2013-11-13+00%3A00%3A00&sort=original_release_date:desc&limit=10

This does it, seems you have to add the current date in as the end date. I tried running it up to 2013-12-31 but it started returning unreleased games.

If you are using PHP don't forget you need to use urlencode() on the dates or it won't work - e.g:

$filter = urlencode('1700-01-01 00:00:00') . '|' . urlencode(date("Y-m-d 00:00:00"));