No Subscription to this function
GET /motorsports/get_championships
Returns all championships and their championship_seasons you are subscribed to
Request URL
https://dsg-api.com/clients/{client_name}/motorsports/get_championships?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)
lang
string
two-character language code, defaults to 'en'
Nodes
championship
details about a championship
championship_id
unique championship identifier
name
name of the particular championship
championship_season
details about a championship season
championship_season_id
unique identifier of a championship season
title
title of the particular championship season
method
details about the API function
method_id
unique ID of method.
name
name of method.
Response Headers
200
Success
401
Unauthorized
429
Rate limit exceeded
Code Samples
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://dsg-api.com/clients/{client_name}/motorsports/get_championships?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}/motorsports/get_championships?client={client_name}&authkey={client_authkey}"
response = requests.get("https://dsg-api.com/clients/{client_name}/motorsports/get_championships?client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"1.0","sport":"motorsports","lang":"en","method":{"method_id":"321","name":"get_tours"},"championship":[{"championship_id":"7","name":"FIA Formula One World Championship","championship_season":[{"championship_season_id":"24","title":"2019"},{"championship_season_id":"13","title":"2018"},{"championship_season_id":"23","title":"2017"}]},{"championship_id":"9","name":"Formula E","championship_season":{"championship_season_id":"16","title":"2018"}},{"championship_id":"11","name":"Indycar","championship_season":{"championship_season_id":"26","title":"2019"}}]}}