Subscription to this function is not available for your account. To upgrade and receive access to this contact sales@datasportsgroup.com
v2 GET /field_hockey/get_seasons
Returns all (authorized) seasons (that have been recently updated).
Request URL
https://dsg-api.com/clients/{client_name}/field_hockey/get_seasons?comp_id={competition_id}&client={client_name}&authkey={client_authkey}
Parameters
authkey
string Required
client authentification key
client
string Required
unique client ID
comp_id
int Required
competition id to get seasons from
ftype
string
changes feed type from XML to json (ftype=json)
lang
string
two-character language code, defaults to 'en'
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 to filter out leagues or cups
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
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
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}/field_hockey/get_seasons?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}/field_hockey/get_seasons?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}/field_hockey/get_seasons?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}/field_hockey/get_seasons?comp_id={competition_id}&client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"2.0","sport":"field_hockey","lang":"en","method":{"method_id":"197","name":"get_seasons"},"competition":{"competition_id":"1958","name":"Hockey Champions Trophy","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","last_updated":"2018-09-08 11:55:41","season":[{"season_id":"16921","title":"2018 Netherlands","original_name":"Rabobank Hockey Champions Trophy","start_date":"2018-06-23","end_date":"2018-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 00:32:00"},{"season_id":"16924","title":"2016 Great Britain","original_name":"Hockey Champions Trophy","start_date":"2016-06-23","end_date":"2016-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:26:05"},{"season_id":"16925","title":"2014 India","original_name":"Hockey Champions Trophy","start_date":"2014-06-23","end_date":"2014-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:26:11"},{"season_id":"16926","title":"2012 Australia","original_name":"Hockey Champions Trophy","start_date":"2012-06-23","end_date":"2012-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:27:26"},{"season_id":"16927","title":"2011 New Zealand","original_name":"Hockey Champions Trophy","start_date":"2011-06-23","end_date":"2011-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:27:34"},{"season_id":"16928","title":"2010 Germany","original_name":"Hockey Champions Trophy","start_date":"2010-06-23","end_date":"2010-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:27:45"},{"season_id":"16929","title":"2009 Australia","original_name":"Hockey Champions Trophy","start_date":"2009-06-23","end_date":"2009-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16930","title":"2008 Netherlands","original_name":"Hockey Champions Trophy","start_date":"2008-06-23","end_date":"2008-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16931","title":"2007 Malaysia","original_name":"Hockey Champions Trophy","start_date":"2007-06-23","end_date":"2007-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16932","title":"2006 Spain","original_name":"Hockey Champions Trophy","start_date":"2006-06-23","end_date":"2006-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16933","title":"2005 India","original_name":"Hockey Champions Trophy","start_date":"2005-06-23","end_date":"2005-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16934","title":"2004 Pakistan","original_name":"Hockey Champions Trophy","start_date":"2004-06-23","end_date":"2004-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16935","title":"2003 Netherlands","original_name":"Hockey Champions Trophy","start_date":"2003-06-23","end_date":"2003-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16936","title":"2002 Germany","original_name":"Hockey Champions Trophy","start_date":"2002-06-23","end_date":"2002-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16937","title":"2001 Netherlands","original_name":"Hockey Champions Trophy","start_date":"2001-06-23","end_date":"2001-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16938","title":"2000 Netherlands","original_name":"Hockey Champions Trophy","start_date":"2000-06-23","end_date":"2000-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16939","title":"1999 Australia","original_name":"Hockey Champions Trophy","start_date":"1999-06-23","end_date":"1999-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16940","title":"1998 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1998-06-23","end_date":"1998-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16941","title":"1997 Australia","original_name":"Hockey Champions Trophy","start_date":"1997-06-23","end_date":"1997-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16942","title":"1996 India","original_name":"Hockey Champions Trophy","start_date":"1996-06-23","end_date":"1996-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16943","title":"1995 Germany","original_name":"Hockey Champions Trophy","start_date":"1995-06-23","end_date":"1995-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16944","title":"1994 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1994-06-23","end_date":"1994-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16945","title":"1993 Malaysia","original_name":"Hockey Champions Trophy","start_date":"1993-06-23","end_date":"1993-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16946","title":"1992 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1992-06-23","end_date":"1992-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16947","title":"1991 Germany","original_name":"Hockey Champions Trophy","start_date":"1991-06-23","end_date":"1991-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16948","title":"1990 Australia","original_name":"Hockey Champions Trophy","start_date":"1990-06-23","end_date":"1990-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16949","title":"1989 Germany","original_name":"Hockey Champions Trophy","start_date":"1989-06-23","end_date":"1989-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16950","title":"1988 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1988-06-23","end_date":"1988-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16951","title":"1987 Netherlands","original_name":"Hockey Champions Trophy","start_date":"1987-06-23","end_date":"1987-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16952","title":"1986 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1986-06-23","end_date":"1986-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16953","title":"1985 Australia","original_name":"Hockey Champions Trophy","start_date":"1985-06-23","end_date":"1985-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16954","title":"1984 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1984-06-23","end_date":"1984-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16955","title":"1983 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1983-06-23","end_date":"1983-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16956","title":"1982 Netherlands","original_name":"Hockey Champions Trophy","start_date":"1982-06-23","end_date":"1982-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16957","title":"1981 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1981-06-23","end_date":"1981-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16958","title":"1980 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1980-06-23","end_date":"1980-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"},{"season_id":"16959","title":"1978 Pakistan","original_name":"Hockey Champions Trophy","start_date":"1978-06-23","end_date":"1978-07-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1958.png","last_updated":"2018-06-23 13:18:46"}]}}}