Bug, or "undocumented feature" ?

Avatar image for thanerd
ThaNerd

15

Forum Posts

11

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By ThaNerd

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?

Avatar image for thebeast
thebeast

1920

Forum Posts

13373

Wiki Points

0

Followers

Reviews: 0

User Lists: 7

#2  Edited By thebeast

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?

Avatar image for andy
andy

445

Forum Posts

298

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

#3  Edited By andy

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.

Avatar image for thanerd
ThaNerd

15

Forum Posts

11

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#4  Edited By ThaNerd

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!