Subscription to this function is not available for your account. To upgrade and receive access to this contact sales@datasportsgroup.com
v2 GET /australian_football/get_seasons
Returns all (authorized) seasons (that have been recently updated).
Request URL
https://dsg-api.com/clients/{client_name}/australian_football/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 (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
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}/australian_football/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}/australian_football/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}/australian_football/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}/australian_football/get_seasons?comp_id={competition_id}&client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"1.0","sport":"australian_football","lang":"en","method":{"method_id":"179","name":"get_seasons"},"competition":{"competition_id":"1522","name":"AFL","teamtype":"male","type":"club","format":"domestic_league","area_id":"19","area_name":"Australia","last_updated":"2018-06-08 00:40:13","season":[{"season_id":"20044","title":"2019","original_name":"Toyota AFL Premiership","start_date":"2019-03-21","end_date":"2019-09-28","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-02-01 20:42:45"},{"season_id":"14450","title":"2018","original_name":"Toyota AFL Premiership","start_date":"2018-03-01","end_date":"2018-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:54:40"},{"season_id":"13953","title":"2017","original_name":"Toyota AFL Premiership","start_date":"2017-02-15","end_date":"2017-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:55:02"},{"season_id":"16028","title":"2016","original_name":"Toyota AFL Premiership","start_date":"2016-02-15","end_date":"2016-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:55:38"},{"season_id":"16029","title":"2015","original_name":"Toyota AFL Premiership","start_date":"2015-02-15","end_date":"2015-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:56:11"},{"season_id":"16030","title":"2014","original_name":"Toyota AFL Premiership","start_date":"2014-02-15","end_date":"2014-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:56:28"},{"season_id":"16031","title":"2013","original_name":"Toyota AFL Premiership","start_date":"2013-02-15","end_date":"2013-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:56:45"},{"season_id":"16032","title":"2012","original_name":"Toyota AFL Premiership","start_date":"2012-02-15","end_date":"2012-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:56:59"},{"season_id":"16033","title":"2011","original_name":"Toyota AFL Premiership","start_date":"2011-02-15","end_date":"2011-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:57:17"},{"season_id":"16034","title":"2010","original_name":"Toyota AFL Premiership","start_date":"2010-02-15","end_date":"2010-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-01-03 22:57:45"},{"season_id":"16035","title":"2009","original_name":"Toyota AFL Premiership","start_date":"2009-02-15","end_date":"2009-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-02-01 20:42:45"},{"season_id":"16036","title":"2008","original_name":"Toyota AFL Premiership","start_date":"2008-02-15","end_date":"2008-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-02-01 20:42:45"},{"season_id":"16037","title":"2007","original_name":"Toyota AFL Premiership","start_date":"2007-02-15","end_date":"2007-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2019-02-01 20:42:45"},{"season_id":"16038","title":"2006","original_name":"AFL","start_date":"2006-02-15","end_date":"2006-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16039","title":"2005","original_name":"AFL","start_date":"2005-02-15","end_date":"2005-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16040","title":"2004","original_name":"AFL","start_date":"2004-02-15","end_date":"2004-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16041","title":"2003","original_name":"AFL","start_date":"2003-02-15","end_date":"2003-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16042","title":"2002","original_name":"AFL","start_date":"2002-02-15","end_date":"2002-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16043","title":"2001","original_name":"AFL","start_date":"2001-02-15","end_date":"2001-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16044","title":"2000","original_name":"AFL","start_date":"2000-02-15","end_date":"2000-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16045","title":"1999","original_name":"AFL","start_date":"1999-02-15","end_date":"1999-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16046","title":"1998","original_name":"AFL","start_date":"1998-02-15","end_date":"1998-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16047","title":"1997","original_name":"AFL","start_date":"1997-02-15","end_date":"1997-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16048","title":"1996","original_name":"AFL","start_date":"1996-02-15","end_date":"1996-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16049","title":"1995","original_name":"AFL","start_date":"1995-02-15","end_date":"1995-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16050","title":"1994","original_name":"AFL","start_date":"1994-02-15","end_date":"1994-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16051","title":"1993","original_name":"AFL","start_date":"1993-02-15","end_date":"1993-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16052","title":"1992","original_name":"AFL","start_date":"1992-02-15","end_date":"1992-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16053","title":"1991","original_name":"AFL","start_date":"1991-02-15","end_date":"1991-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"},{"season_id":"16054","title":"1990","original_name":"AFL","start_date":"1990-02-15","end_date":"1990-10-01","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1522_13.png","last_updated":"2018-05-17 16:43:05"}]}}}