No Subscription to this function
GET /basketball/get_prematch
Returns pre-match statistics around teams and players
Request URL
https://dsg-api.com/clients/{client_name}/basketball/get_prematch?id={match_id}&client={client_name}&authkey={client_authkey}
Parameters
ftype
string
changes feed type from XML to json (ftype=json)
Nodes
Response Headers
200
Success
401
Unauthorized
429
Rate limit exceeded
Code Samples
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://dsg-api.com/clients/{client_name}/basketball/get_prematch?id={match_id}&client={client_name}&authkey={client_authkey}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "User:Password");
$content = curl_exec($ch);
curl_close($ch);
?>
curl GET -u "User:Password" "https://dsg-api.com/clients/{client_name}/basketball/get_prematch?id={match_id}&client={client_name}&authkey={client_authkey}"
response = requests.get("https://dsg-api.com/clients/{client_name}/basketball/get_prematch?id={match_id}&client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"2.0","sport":"basketball","lang":"en","method":{"method_id":"49","name":"get_matches"},"competition":{"competition_id":"933","name":"NBA","teamtype":"male","type":"club","format":"domestic_league","area_id":"203","area_name":"United States","last_updated":"2018-12-24 00:35:19","season":{"season_id":"17932","title":"2018\/2019","original_name":"NBA","start_date":"2018-10-16","end_date":"2019-06-18","last_updated":"2018-09-24 08:45:50","rounds":{"round_id":"23599","name":"Regular Season","start_date":"2018-10-17","end_date":"2019-04-12","type":"table","current_gameweek":"","last_updated":"2018-08-16 12:25:46","match":{"match_id":"1417780","date":"2018-10-17","time":"02:00:00","date_utc":"2018-10-17","time_utc":"00:00:00","team_a_id":"25473","team_a_name":"Boston Celtics","team_a_short_name":"Celtics","team_a_tla_name":"BOS","team_a_original_name":"Boston Celtics","team_a_country":"USA","team_a_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25473.png","team_b_id":"25474","team_b_name":"Philadelphia 76ers","team_b_short_name":"76ers","team_b_tla_name":"PHI","team_b_original_name":"Philadelphia 76ers","team_b_country":"USA","team_b_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25474.png","status":"Played","gameweek":"","winner":"team_A","score_a":"105","score_b":"87","p1s_a":"21","p1s_b":"21","p2s_a":"26","p2s_b":"21","p3s_a":"30","p3s_b":"24","p4s_a":"28","p4s_b":"21","venue_type":"home_away","final_period":"bkb_p4s","attendance":"18624","venue_id":"5066","venue_name":"TD Garden","venue_city":"Boston, MA","last_updated":"2019-08-05 12:10:11","final":"no","team_stats_offense":{"points":{"team_a":"","team_b":""},"defensiveRebounds":{"team_a":"","team_b":""},"offensiveRebounds":{"team_a":"","team_b":""},"totalRebounds":{"team_a":"","team_b":""},"assists":{"team_a":"","team_b":""},"steals":{"team_a":"","team_b":""},"blocks":{"team_a":"","team_b":""},"twoPointsMade":{"team_a":"","team_b":""},"threePointsMade":{"team_a":"","team_b":""},"freeThrowsMade":{"team_a":"","team_b":""}},"team_stats_defense":{"points":{"team_a":"","team_b":""},"defensiveRebounds":{"team_a":"","team_b":""},"offensiveRebounds":{"team_a":"","team_b":""},"totalRebounds":{"team_a":"","team_b":""},"assists":{"team_a":"","team_b":""},"steals":{"team_a":"","team_b":""},"blocks":{"team_a":"","team_b":""},"twoPointsMade":{"team_a":"","team_b":""},"threePointsMade":{"team_a":"","team_b":""},"freeThrowsMade":{"team_a":"","team_b":""}},"player_stats":{"points":{"team_a":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""},"team_b":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""}},"rebounds":{"team_a":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""},"team_b":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""}},"assists":{"team_a":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""},"team_b":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""}},"steals":{"team_a":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""},"team_b":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""}},"blocks":{"team_a":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""},"team_b":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""}},"freeThrows":{"team_a":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""},"team_b":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""}},"threePoints":{"team_a":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""},"team_b":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""}},"twoPoints":{"team_a":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""},"team_b":{"people_id":"","common_name":"","match_name":"","nationality":"","count":""}}}}}}}}}