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.
Boolean (0 or 1). If an individual game ID is passed to the resource, you will have the option of setting this value to true or false. If it is set to true, all statistics and shot charts will be returned to you. This defaults to false.
String. The date that the game was played on. Must be in MMDDYY 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 = 'https://probasketballapi.com/games'; $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; ?>