#1 Posted by ThaNerd (15 posts) -

My first tries with programming the API were passing as few parameters as possible. After a while, i added parameters to all my calls to the api (i mean, beyond the "format" and "api_key" parameters). Sometimes, lazyness made me copy/paste the list of fields i requested from the server, giving sometimes stupid field_list parameters... For example, i requested the "genre" field for a "release" api request...

So, i wanted to see everyhing available in a test query, thus i commented out the "field_list" parameter. But when i did that, the server returned a 500 error code. Is it expected behaviour?

#2 Posted by TheBeast (1920 posts) -

From what you're saying here, without seeing your code, I can't quite figure out what effect 'commenting out' the field_list parameter is having on the request URL - perhaps you could log the actual URL used and see if it's malformed in any way?

#3 Posted by andy (445 posts) -

If you were the one querying release info, there was a completely unrelated bug that had nothing to do with your query.  It's now fixed.  Try your queries again.

#4 Edited by ThaNerd (15 posts) -

Yes, i was querying the release info, and now it's working...

My code for building the URL is the following:

$query['format'] = 'json';
$query['api_key'] = $gbapikey;
//$query['field_list'] = 'deck,developers,distributors,expected_release_month,expected_release_quarter,expected_release_year,id,name,platform,publishers,region,release_date,site_details_url';
$url= 'http://api.giantbomb.com/release/'.$_REQUEST['q'].'/?';
foreach($query as $k=>$v) {
    $url .= urlencode($k) . '=' . urlencode($v) . '&';

Actually, it's rather a good thing to force coders to use the field_list parameters. I don't use the "description" field, which is rather long. So filtering it out is good in terms of bandwidth...

Thanks for reacting this fast, Andy!