Subscription to this function is not available for your account. To upgrade and receive access to this contact sales@datasportsgroup.com
v3 GET /ice_hockey/get_trophies
Returns a list of trophies & runner-ups for per team or competition
Request URL
https://dsg-api.com/clients/{client_name}/ice_hockey/get_trophies?comp_id={competition_id}&client={client_name}&authkey={client_authkey}
API Threshold
- 10k calls per hour (2.78 calls per second)
- This threshold applies to ALL your calls you do across the API.
- Your number of calls get reset every hour at :00
- If the thresold is reached within the hour you will get a xml/json message accordingly (which is gone when the next hour starts, see previous point)
Parameters
authkey
string Required
client authentification key
client
string Required
unique client ID
competition
int Required
competition id to get trophies from
ftype
string
changes feed type from XML to json (ftype=json or ftype=json_array)
lang
string
two-character language code, defaults to 'en'
team
int Required
team id to get trophies from
Nodes
competition❯
details about competition
area_id
unique identifier for an area
area_name
name of the area
competition_id
unique identifier for a competition
format
competition format (domestic_league, domestic_cup, domestic_league_cup, domestic_super_cup, international_cup, international_super_cup, playoff, tournament, race, unofficial)
gender
determines the gender of the competition (male or female)
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
name
name of the competition
type
determines if a competition is between club teams (club) or national teams (international)
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 call
sport
sport value
version
version of the API
method❯
details about the API function
method_id
unique ID of method
name
name of method
runnerup❯
details about the runnerup
area_id
unique identifier for an area
area_name
name of the area
original_name
original name of the team during the season
runnerups
number of runner-ups in the competition
season_type
type of season, default "Normal". Mainly used for Aptertura/Clausura cases
team_id
unique identifier of the team
team_name
current team name
season❯
details about the season
end_date
end date, 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 season
original_name
competition name during this season
season_id
unique identifier for season
start_date
start date, format 'yyyy-mm-dd'
title
title of season
winner❯
details about the winner
area_id
unique identifier for an area
area_name
name of the area
original_name
original name of the team during the season
season_type
type of season, default "Normal". Mainly used for Aptertura/Clausura cases
team_id
unique identifier of the team
team_name
current team name
wins
number of won trophies in the competition
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}/ice_hockey/get_trophies?comp_id={competition_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}/ice_hockey/get_trophies?comp_id={competition_id}&client={client_name}&authkey={client_authkey}"
Imports System
Imports System.Net
Imports System.IO
Imports System.Text
Public Module Module1
Public Sub Main()
Dim url As String = "https://dsg-api.com/clients/{client_name}/ice_hockey/get_trophies?comp_id={competition_id}&client={client_name}&authkey={client_authkey}"
Dim myReq As WebRequest = WebRequest.Create(url)
myReq.Credentials = new System.Net.NetworkCredential("{User}", "{Password}")
Dim wr As WebResponse = myReq.GetResponse()
Dim receiveStream As Stream = wr.GetResponseStream()
Dim reader As StreamReader = New StreamReader(receiveStream, Encoding.UTF8)
Dim content As String = reader.ReadToEnd()
End Sub
End Module
response = requests.get("https://dsg-api.com/clients/{client_name}/ice_hockey/get_trophies?comp_id={competition_id}&client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example200 Success{"datasportsgroup":{"version":"1.0","sport":"ice_hockey","lang":"en","method":{"method_id":"282","name":"get_trophies"},"competition":{"competition_id":"975","name":"KHL","teamtype":"male","type":"club","format":"domestic_league","area_id":"160","area_name":"Russia","last_updated":"2018-12-24 00:34:36","season":[{"season_id":"17941","title":"2018\/2019","original_name":"KHL","start_date":"2018-09-01","end_date":"2019-04-25","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/975_1.png","last_updated":"2018-08-16 14:18:19","winner":{"team_id":"25578","team_name":"HC CSKA Moskva","original_name":"HC CSKA Moskva","area":"RUS","season_type":""},"runnerup":{"team_id":"25594","team_name":"Avangard Omsk","original_name":"Avangard Omsk","area":"RUS","season_type":""}},{"season_id":"13333","title":"2017\/2018","original_name":"KHL","start_date":"2017-08-22","end_date":"2018-04-19","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/975_2.png","last_updated":"2017-06-08 14:12:04","winner":{"team_id":"25585","team_name":"AK Bars Kazan","original_name":"AK Bars Kazan","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"25578","team_name":"HC CSKA Moskva","original_name":"HC CSKA Moskva","area":"RUS","season_type":"Normal"}},{"season_id":"12118","title":"2016\/2017","original_name":"KHL","start_date":"2016-08-22","end_date":"2017-04-19","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/975.png","last_updated":"2016-07-25 15:50:40","winner":{"team_id":"25575","team_name":"SKA Saint Petersburg","original_name":"SKA Saint Petersburg","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"25588","team_name":"Metallurg Magnitogorsk","original_name":"Metallurg Magnitogorsk","area":"RUS","season_type":"Normal"}},{"season_id":"12154","title":"2015\/2016","original_name":"KHL","start_date":"2015-08-22","end_date":"2016-04-19","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/975_1.png","last_updated":"2017-06-08 13:51:31","winner":{"team_id":"25588","team_name":"Metallurg Magnitogorsk","original_name":"Metallurg Magnitogorsk","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"25578","team_name":"HC CSKA Moskva","original_name":"HC CSKA Moskva","area":"RUS","season_type":"Normal"}},{"season_id":"16654","title":"2014\/2015","original_name":"KHL","start_date":"2014-10-15","end_date":"2015-06-12","logo":"","last_updated":"2018-06-06 13:05:38","winner":{"team_id":"25575","team_name":"SKA Saint Petersburg","original_name":"SKA Saint Petersburg","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"25585","team_name":"AK Bars Kazan","original_name":"AK Bars Kazan","area":"RUS","season_type":"Normal"}},{"season_id":"16655","title":"2013\/2014","original_name":"KHL","start_date":"2013-10-15","end_date":"2014-06-12","logo":"","last_updated":"2018-06-06 13:05:38","winner":{"team_id":"25588","team_name":"Metallurg Magnitogorsk","original_name":"Metallurg Magnitogorsk","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"36450","team_name":"HC Lev Praha","original_name":"HC Lev Praha","area":"CZE","season_type":"Normal"}},{"season_id":"16656","title":"2012\/2013","original_name":"KHL","start_date":"2012-10-15","end_date":"2013-06-12","logo":"","last_updated":"2018-06-06 13:05:38","winner":{"team_id":"25579","team_name":"HC Dynamo Moskva","original_name":"HC Dynamo Moskva","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"25590","team_name":"Traktor Chelyabinsk","original_name":"Traktor Chelyabinsk","area":"RUS","season_type":"Normal"}},{"season_id":"16657","title":"2011\/2012","original_name":"KHL","start_date":"2011-10-15","end_date":"2012-06-12","logo":"","last_updated":"2018-06-06 13:05:38","winner":{"team_id":"25579","team_name":"HC Dynamo Moskva","original_name":"HC Dynamo Moskva","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"25594","team_name":"Avangard Omsk","original_name":"Avangard Omsk","area":"RUS","season_type":"Normal"}},{"season_id":"16658","title":"2010\/2011","original_name":"KHL","start_date":"2010-10-15","end_date":"2011-06-12","logo":"","last_updated":"2018-06-06 13:05:38","winner":{"team_id":"25597","team_name":"Salavat Yulaev Ufa","original_name":"Salavat Yulaev Ufa","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"36451","team_name":"Atlant Moskva Oblast","original_name":"Atlant Moskva Oblast","area":"RUS","season_type":"Normal"}},{"season_id":"16659","title":"2009\/2010","original_name":"KHL","start_date":"2009-10-15","end_date":"2010-06-12","logo":"","last_updated":"2018-06-06 13:05:38","winner":{"team_id":"25585","team_name":"AK Bars Kazan","original_name":"AK Bars Kazan","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"36452","team_name":"HC MVD","original_name":"HC MVD","area":"RUS","season_type":"Normal"}},{"season_id":"16660","title":"2008\/2009","original_name":"KHL","start_date":"2008-10-15","end_date":"2009-06-12","logo":"","last_updated":"2018-06-06 13:05:38","winner":{"team_id":"25585","team_name":"AK Bars Kazan","original_name":"AK Bars Kazan","area":"RUS","season_type":"Normal"},"runnerup":{"team_id":"25581","team_name":"Lokomotiv Yaroslavl","original_name":"Lokomotiv Yaroslavl","area":"RUS","season_type":"Normal"}}]}}}