No Subscription to this function
GET /golf/get_leaderboard
Returns the leaderboard for a particular tournament
Request URL
https://dsg-api.com/clients/{client_name}/golf/get_leaderboard?id={season_id}&client={client_name}&authkey={client_authkey}
Parameters
authkey
string Required
client authentification key
client
string Required
unique client ID
ftype
string
changes feed type from XML to json (ftype=json)
id
int Required
required a valid tournament_id
lang
string
two-character language code, defaults to 'en'
picsize
string
one of 150x150, 50x50, 30x30 or 18x18 to get correct size of contestant picture.
Nodes
competition
Details about competition
area_id
unique identifier for area.
area_name
contains the area name.
competition_id
unique identifier for a competition.
format
competition format to filter out leagues or cups
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
name
name of the competition.
teamtype
determines the type of team/competition (male,female,male_youth,female_youth)
type
determines if a competition is between club teams (club) or national teams (international).
contestant
result informations for the contestant
common_name
common name of the contestant
contestant_id
unique identifier for the contestant
contestant_picture
full path URL of contestant headshot, size can be changed via the picsize parameter
current_round
current round for the contestant
current_round_id
unique identifier of current round for the contestant
first_name
first name of the contestant
last_name
last name of the contestant
match_name
match name of the contestant (aka short name)
nationality
nationality of the contestant
nationality_area_id
unique identifier for an area
par_round_1
how much under/over par for round 1
par_round_2
how much under/over par for round 2
par_round_3
how much under/over par for round 3
par_round_4
how much under/over par for round 4
position
final position in this tournament
status
contestant status for the tournament
strokes_round_1
number of strokes in round 1
strokes_round_2
number of strokes in round 2
strokes_round_3
number of strokes in round 3
strokes_round_4
number of strokes in round 4
tee_time_today
tee time for the latest round of this tournament
thru
indicates which holes/rounds the player already finished. (F = finished tournament)
today_par
number of over/under par for the latest round of this tournament
total_par
total number of over/under par for this tournament
total_strokes
number of total strokes for this tournament
datasportsgroup
details about the API version, sport, language and generation timestamp
generated_utc
UTC timestamp when the API output was generated
lang
language of the API
sport
sport of the API
version
version of the API
method
details about the API function
method_id
unique ID of method.
name
name of method.
tournament
Details about tournament
end_date
End date of tournament, format 'yyyy-mm-dd'.
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
logo
full path URL of logo for particular tournament
start_date
Start date of tournament, format 'yyyy-mm-dd'.
tournament_id
unique identifier for a tournament.
tournament_name
tournament name during this season
tournament_title
title of the particular tournament
Response Headers
200
Success
401
Unauthorized
429
Too Many Requests
Code Samples
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://dsg-api.com/clients/{client_name}/golf/get_leaderboard?id={season_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}/golf/get_leaderboard?id={season_id}&client={client_name}&authkey={client_authkey}"
response = requests.get("https://dsg-api.com/clients/{client_name}/golf/get_leaderboard?id={season_id}&client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"1.0","sport":"golf","lang":"en","method":{"method_id":"149","name":"get_leaderboard"},"competition":{"competition_id":"1486","name":"TOUR Championship","teamtype":"male","type":"player","format":"tournament","area_id":"203","area_name":"United States","last_updated":"2017-07-28 16:11:34","season":{"season_id":"19744","title":"2019","original_name":"TOUR Championship","start_date":"2019-08-22","end_date":"2019-08-25","last_updated":"2018-12-15 15:00:09","logo":"https:\/\/www.dsg-images.com\/comps\/100x100\/"}}}}