No Subscription to this function
GET /cricket/get_tables
Returns the league, home & away tables per season or round.
Request URL
https://dsg-api.com/clients/{client_name}/cricket/get_tables?type={type}&id={id}&client={client_name}&authkey={client_authkey}
Parameters
authkey
string Required
client authentification key
client
string Required
unique client ID
date
string
set a date in format yyyy-mm-dd as limit
ftype
string
changes feed type from XML to json (ftype=json)
gameweek
int
gameweek value to get table from
id
int Required
object id to return
lang
string
two-character language code, defaults to 'en'
live
string
only 'yes' is valid which will provide a live table
type
string Required
type is either "season" or "round"
Nodes
competition
Details about competition
area_id
unique identifier for area.
area_name
contains the area name.
competition_id
unique identifier for a competition.
cricket_type
valid values are "T20", "ODI" and "Test"
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).
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
group
Details about group
group_id
unique identifier to the group.
last_updated
When group was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
name
name of group
method
details about the API function
method_id
unique ID of method.
name
name of method.
rounds
Details about round
current_gameweek
displays the gameweek of nearest match to today
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.
name
name of round
round_id
unique identifier of round.
start_date
start date, format 'yyyy-mm-dd'.
type
Determines if the round contains a table or a cup structure (knock-out).
season
Details about 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
table
Details about table position entry
matches_lost
value for total lost matches
matches_total
value for total played matches
matches_won
value for total won matches
no_result
value for total no result matches
original_team_name
original team name during the season
position
current table position
runs_against
value for total runs against
runs_for
value for total runs scored
short_name
short name of the team.
team_id
Unique identifier for team.
team_name
current team name
tied
value for total tied matches
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}/cricket/get_tables?type={type}&id={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}/cricket/get_tables?type={type}&id={id}&client={client_name}&authkey={client_authkey}"
response = requests.get("https://dsg-api.com/clients/{client_name}/cricket/get_tables?type={type}&id={id}&client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"1.0","sport":"cricket","lang":"en","method":{"method_id":"28","name":"get_tables"},"competition":{"competition_id":"1048","name":"Indian Premier League","teamtype":"male","type":"club","format":"domestic_league","cricket_type":"T20","area_id":"94","area_name":"India","last_updated":"2018-06-10 14:08:49","season":{"season_id":"15641","title":"2018","original_name":"VIVO IPL","start_date":"2018-04-07","end_date":"2018-05-27","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1048.png","last_updated":"2018-02-26 12:44:53","rounds":{"round_id":"20398","name":"Regular Season","start_date":"2018-04-07","end_date":"2018-05-20","type":"table","last_updated":"2018-02-26 12:02:04","total":{"table":[{"position":"1","team_id":"25801","team_name":"Sunrisers Hyerabad","short_name":"Sunrisers","original_team_name":"Sunrisers Hyerabad","zone":"Championship Playoffs","zone_id":"champ_playoffs","prev_season":"","form":"L,L,L,W,W","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"9","matches_lost":"5","matches_tied":"0","no_result":"0","points":"18","net_run_rate":"0.277"},{"position":"2","team_id":"25796","team_name":"Chennai Super Kings","short_name":"Chennai SK","original_team_name":"Chennai Super Kings","zone":"Championship Playoffs","zone_id":"champ_playoffs","prev_season":"","form":"W,L,W,L,W","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"9","matches_lost":"5","matches_tied":"0","no_result":"0","points":"18","net_run_rate":"0.26"},{"position":"3","team_id":"25800","team_name":"Kolkata Knight Riders","short_name":"Kolkata KR","original_team_name":"Kolkata Knight Riders","zone":"Championship Playoffs","zone_id":"champ_playoffs","prev_season":"","form":"W,W,W,L,L","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"8","matches_lost":"6","matches_tied":"0","no_result":"0","points":"16","net_run_rate":"-0.06"},{"position":"4","team_id":"25799","team_name":"Rajasthan Royals","short_name":"Rajasthan","original_team_name":"Rajasthan Royals","zone":"Championship Playoffs","zone_id":"champ_playoffs","prev_season":"","form":"W,L,W,W,W","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"7","matches_lost":"7","matches_tied":"0","no_result":"0","points":"14","net_run_rate":"-0.315"},{"position":"5","team_id":"25797","team_name":"Mumbai Indians","short_name":"Mumbai Indians","original_team_name":"Mumbai Indians","zone":"","zone_id":"","prev_season":"","form":"L,W,L,W,W","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"6","matches_lost":"8","matches_tied":"0","no_result":"0","points":"12","net_run_rate":"0.324"},{"position":"6","team_id":"25798","team_name":"Royal Challengers Bangalore","short_name":"RC Bangalore","original_team_name":"Royal Challengers Bangalore","zone":"","zone_id":"","prev_season":"","form":"L,W,W,W,L","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"6","matches_lost":"8","matches_tied":"0","no_result":"0","points":"12","net_run_rate":"0.129"},{"position":"7","team_id":"25803","team_name":"Kings XI Punjab","short_name":"Kings XI","original_team_name":"Kings XI Punjab","zone":"","zone_id":"","prev_season":"","form":"L,L,L,L,L","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"6","matches_lost":"8","matches_tied":"0","no_result":"0","points":"12","net_run_rate":"-0.524"},{"position":"8","team_id":"25802","team_name":"Delhi Capitals","short_name":"Delhi Capitals","original_team_name":"Delhi Daredevils","zone":"","zone_id":"","prev_season":"","form":"W,W,L,L,L","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"5","matches_lost":"9","matches_tied":"0","no_result":"0","points":"10","net_run_rate":"-0.127"}]},"home":{"table":[{"position":"1","team_id":"25796","team_name":"Chennai Super Kings","short_name":"Chennai SK","original_team_name":"Chennai Super Kings","matches_total":"7","matches_won":"6","matches_lost":"1","matches_tied":"0","no_result":"0","points":"12","net_run_rate":"0.865"},{"position":"2","team_id":"25801","team_name":"Sunrisers Hyerabad","short_name":"Sunrisers","original_team_name":"Sunrisers Hyerabad","matches_total":"7","matches_won":"5","matches_lost":"2","matches_tied":"0","no_result":"0","points":"10","net_run_rate":"0.354"},{"position":"3","team_id":"25799","team_name":"Rajasthan Royals","short_name":"Rajasthan","original_team_name":"Rajasthan Royals","matches_total":"7","matches_won":"5","matches_lost":"2","matches_tied":"0","no_result":"0","points":"10","net_run_rate":"0.193"},{"position":"4","team_id":"25802","team_name":"Delhi Capitals","short_name":"Delhi Capitals","original_team_name":"Delhi Daredevils","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"0.529"},{"position":"5","team_id":"25798","team_name":"Royal Challengers Bangalore","short_name":"RC Bangalore","original_team_name":"Royal Challengers Bangalore","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"0.177"},{"position":"6","team_id":"25800","team_name":"Kolkata Knight Riders","short_name":"Kolkata KR","original_team_name":"Kolkata Knight Riders","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"0.025"},{"position":"7","team_id":"25803","team_name":"Kings XI Punjab","short_name":"Kings XI","original_team_name":"Kings XI Punjab","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"-0.812"},{"position":"8","team_id":"25797","team_name":"Mumbai Indians","short_name":"Mumbai Indians","original_team_name":"Mumbai Indians","matches_total":"7","matches_won":"3","matches_lost":"4","matches_tied":"0","no_result":"0","points":"6","net_run_rate":"0.047"}]},"away":{"table":[{"position":"1","team_id":"25801","team_name":"Sunrisers Hyerabad","short_name":"Sunrisers","original_team_name":"Sunrisers Hyerabad","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"0.193"},{"position":"2","team_id":"25800","team_name":"Kolkata Knight Riders","short_name":"Kolkata KR","original_team_name":"Kolkata Knight Riders","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"-0.12"},{"position":"3","team_id":"25797","team_name":"Mumbai Indians","short_name":"Mumbai Indians","original_team_name":"Mumbai Indians","matches_total":"7","matches_won":"3","matches_lost":"4","matches_tied":"0","no_result":"0","points":"6","net_run_rate":"0.598"},{"position":"4","team_id":"25796","team_name":"Chennai Super Kings","short_name":"Chennai SK","original_team_name":"Chennai Super Kings","matches_total":"7","matches_won":"3","matches_lost":"4","matches_tied":"0","no_result":"0","points":"6","net_run_rate":"-0.347"},{"position":"5","team_id":"25798","team_name":"Royal Challengers Bangalore","short_name":"RC Bangalore","original_team_name":"Royal Challengers Bangalore","matches_total":"7","matches_won":"2","matches_lost":"5","matches_tied":"0","no_result":"0","points":"4","net_run_rate":"0.035"},{"position":"6","team_id":"25803","team_name":"Kings XI Punjab","short_name":"Kings XI","original_team_name":"Kings XI Punjab","matches_total":"7","matches_won":"2","matches_lost":"5","matches_tied":"0","no_result":"0","points":"4","net_run_rate":"-0.314"},{"position":"7","team_id":"25799","team_name":"Rajasthan Royals","short_name":"Rajasthan","original_team_name":"Rajasthan Royals","matches_total":"7","matches_won":"2","matches_lost":"5","matches_tied":"0","no_result":"0","points":"4","net_run_rate":"-0.793"},{"position":"8","team_id":"25802","team_name":"Delhi Capitals","short_name":"Delhi Capitals","original_team_name":"Delhi Daredevils","matches_total":"7","matches_won":"1","matches_lost":"6","matches_tied":"0","no_result":"0","points":"2","net_run_rate":"-0.794"}]}}}}}}