#1 Posted by myvault (4 posts) -

when using the API to get the game details we are not able to see the critic score.

This is the code for getting the details is this 1 and this does not show the critic review. The code below is used for that.

$rawData = file_get_contents("http://api.giantbomb.com/game/".$game_id."/?api_key=XXXXXXXXXXXXXXXXXXXX&field_list=name,id,description,original_release_date,genres,platforms&format=json");

$gameInfo = json_decode($rawData);

print_r($gameInfo);

But when we are using this code to get the critic review using the same game id the review of a different game is displayed.

$reviewData = file_get_contents("http://api.giantbomb.com/review/".$game_id."/?api_key=XXXXXXXXXXXXXXXXXXXXXXXXXX&format=json";);

$scoreInfo = json_decode($reviewData);

print_r($scoreInfo);

can anyone tell me what i'm doing wrong ?