#1 Posted by dolbex (2 posts) -

Long time listener, first time caller! :) 
 
First, a coworker pointed me to the GiantBomb API and holy smokes, I've had a lot of fun just messing around with it.  Like a lot of side fun projects I'm throwing more time than I probably need to into it.  I have one feature that is alluding me that will require upcoming games sorted by release date. I have seen many folks complain that sorting is lacking, and I also understand this isn't the primary purpose of Whiskey Media, hence the somewhat limited API.  However, does anyone know what the point of the releases resource is if it's simply ordered by ID?  Doesn't that just make it a gimped up version of the games resource?  What would you actually use that for?
 
Also, if anyone does know how you might be able to retrieve and build a sequential list of upcoming games that would be great.  
 
Thanks,
Dolbex

#2 Posted by LordAndrew (14426 posts) -

Every game resource also includes references to each of its releases, so you don't have to search the releases resource sequentially. Just query the game resource first, then each of its releases.
 
Releases actually contain a good deal of useful information, but they're most useful when you treat the release and the game as a pair. And the sorting issues? Those are a problem throughout the API. The "solution" is to read and cache them all, so you can access and sort the results all at once without having to make calls to the external API every time you want to do something. Although it will require additional work and maintenance on your part, it gives you more freedom to access and manipulate the results as you please.

#3 Posted by dolbex (2 posts) -

Andrew,
 
Roger on the releases table, however, I'm not sure I totally agree with you on the 'solution' giving me 'freedom'. :) I think caching and maintenance goes without saying, but having efficient queries to begin with would assist both me and the api load. I know I'm preaching to the choir here and that Giantbomb plans on expanding the system, I just wondered how I could pull it off if and if I was missing something.  For instance, if I wanted to get 2011 releases in January I can't see a way to do it without reading (and caching) the entire database. Then, if there is an update, I can't sort by latest_updates so I have to read every record to see if there are any updates since the last cache.  Seems like a pretty heavy load  to pull that off.  I think the solution is to just to not do it and patiently wait. :)