Hi!
I'd like to query once every day for a list of PC games that have been just added (in the past 24 hours) and write some info about each to a .json file.
My problem is, I'm not quite sure how to format the query. The following attempt in PHP returns the entire list of PC games (~20000) sorted by date_added. I'd like ONLY games added in the past 24 hours, sorted as descending:
$date = urlencode(date('Y-m-d H:i:s'));
$lastCheck = urlencode(date("Y-m-d H:i:s", strtotime("-24 hours")));
$gamesQuery = file_get_contents('http://www.giantbomb.com/api/games/?api_key=[myKey]&format=json&platforms=94&sort=date_added:desc&filter=date_added:'.$lastCheck.'|'.$date);
How must I format &filter=date_added to achieve what I want?
Any advice is appreciated, thank you! :)
Log in to comment