The Games resource will return information about the games. It will return the home and away scoring, broken up into quarters, as well as having the total score, the home and away team IDs, the season the game took place, and the date that the game took place. You can also pass a boolean value to retrieve all statistics for an individual game.
Integer. The internal ID of the game. This must be passed if you would like to use the get_extra argument.
String. The date that the game was played on. Must be in MM/DD/YYYY format.
String. The season that the game was played in. Must be in YYYY format. If a game was played in 2015, but the season started in 2014 it will be listed under the 2014 season.
Integer. The ID for the home team. Team IDs can be found from the teams resource.
Integer. The ID for the away team. Team IDs can be found from the teams resource.
<?php $url = 'http://api.probasketballapi.com/game'; $api_key = '__YOUR__API__KEY__'; $query_string = 'api_key='.$api_key.'&game_id=21400001&get_extra=1'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); curl_close($ch); echo $result; ?>