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?
Bug, or "undocumented feature" ?
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!
Please Log In to post.
Log in to comment