API - Personal Records
Retrieve a skater's personal records.
URL
Type | URL |
---|---|
XML | https://speedskatingresults.com/api/xml/personal_records.php |
JSON | https://speedskatingresults.com/api/json/personal_records.php |
Parameters
Name | Description |
---|---|
skater |
Skater ID (required) A skater's ID can be found using the search table below. The skater ID can also be found as the s parameter on the URL for a skater's page. For example:
|
distance |
Distance (optional) When the distance parameter is omitted, the personal records for all distances are returned. Specify a value (500, 1000, 1500, 3000, 5000 or 10000) for the distance parameter to retrieve the personal record for that distance only. |
Skater IDs
XML
Element | Description |
---|---|
prs |
The collection of personal records Attributes
|
record | A personal record |
distance | Race distance |
time | Finishing time |
date | Race date (YYYY-MM-DD) |
location | Race location |
Example
API Query: https://speedskatingresults.com/api/xml/personal_records?skater=273
<prs skater="273">
<record>
<distance>500</distance>
<time>34,31</time>
<date>2007-11-17</date>
<location>Calgary (CAN)</location>
</record>
<record>
<distance>1000</distance>
<time>1.09,22</time>
<date>2009-12-30</date>
<location>Salt Lake City (USA)</location>
</record>
<record>
<distance>1500</distance>
<time>1.51,84</time>
<date>2001-11-25</date>
<location>Calgary (CAN)</location>
</record>
<record>
<distance>3000</distance>
<time>4.02,39</time>
<date>2001-11-24</date>
<location>Calgary (CAN)</location>
</record>
<record>
<distance>5000</distance>
<time>7.08,04</time>
<date>2001-11-25</date>
<location>Calgary (CAN)</location>
</record>
<record>
<distance>10000</distance>
<time>15.44,49</time>
<date>2000-12-02</date>
<location>Milwaukee (USA)</location>
</record>
</prs>
JSON
Key | Description |
---|---|
skater | skater ID |
records | The collection of personal records |
distance | Race distance |
time | Finishing time |
date | Race date (YYYY-MM-DD) |
location | Race location |
Example
API Query: https://speedskatingresults.com/api/json/personal_records?skater=273
"skater":273,
"records":[
{"distance":500, "time":"34,30", "date":"2013-11-15", "location":"Salt Lake City (USA)"},
{"distance":1000, "time":"1.09,22", "date":"2009-12-30", "location":"Salt Lake City (USA)"},
{"distance":1500, "time":"1.51,84", "date":"2001-11-25", "location":"Calgary (CAN)"},
{"distance":3000, "time":"4.02,39", "date":"2001-11-24", "location":"Calgary (CAN)"},
{"distance":5000, "time":"7.08,04", "date":"2001-11-25", "location":"Calgary (CAN)"},
{"distance":10000, "time":"15.44,49", "date":"2000-12-02", "location":"Milwaukee (USA)"}
]
}
Example Web Page
The sample web page provides a very basic example of how XML data may be retrieved from SpeedskatingResults.com. It makes use of the jQuery library to handle the the interaction with the API.
Personal Records Example Page (XML)
Personal Records Example Page (JSON)
HTML Code (XML)
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
body {font-family: 'Lucida Grande', Verdana, Arial, sans-serif; padding: 5px;}
table.records {margin: 1em; border-collapse: collapse; }
table.records td {padding: .2em .5em; }
table.records td.distance {width: 5em; font-weight: bold;}
table.records td.time {width: 5em; text-align: right;}
table.records td.date {}
table.records td.location {width: 15em;}
a {color: navy; text-decoration: none; font-weight: bold;}
a:visited {font-weight: normal;}
a:hover {color: crimson;}
</style>
<title>API Example - PR/SB</title>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: "GET",
url: "https://speedskatingresults.com/api/xml/personal_records.php",
data: "skater=273",
dataType: "xml",
success: function(xml) {
$(xml).find('record').each(function() {
var distance = $(this).find('distance').text()+"m";
var time = $(this).find('time').text();
var date = $(this).find('date').text();
var location = $(this).find('location').text();
$('<tr></tr>').html('<td class="distance">'+distance+'</td><td class="time">'+time+
'</td><td class="date">'+date+'</td>'+
<td class="location">'+location+'</td>').appendTo('#prs');
});
}
});
});
</script>
</head>
<body>
<h1>Tucker Fredricks (USA)</h1>
<h2>Personal Records</h2>
<table id="prs" class="records">
</table>
<p><a href="https://speedskatingresults.com/index.php?p=18&s=273">Results</a> from
<a href="https://speedskatingresults.com">SpeedskatingResults.com</a></p>
</body>
</html>
HTML Code (JSON)
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
body {font-family: 'Lucida Grande', Verdana, Arial, sans-serif; padding: 5px;}
table.records {margin: 1em; border-collapse: collapse; }
table.records td {padding: .2em .5em; }
table.records td.distance {width: 5em; font-weight: bold;}
table.records td.time {width: 5em; text-align: right;}
table.records td.date {}
table.records td.location {width: 15em;}
a {color: navy; text-decoration: none; font-weight: bold;}
a:visited {font-weight: normal;}
a:hover {color: crimson;}
</style>
<title>API Example - Personal Records</title>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: "GET",
url: "https://speedskatingresults.com/api/json/personal_records.php",
data: "skater=273",
dataType: "json",
success: function(data) {
data.records.forEach(function(r) {
$('<tr></tr>').html('<td class="distance">'+r.distance+'</td><td class="time">'+r.time+
'</td><td class="date">'+r.date+
'</td><td class="location">'+r.location+'</td>').appendTo('#prs');
});
}
});
});
</script>
</head>
<body>
<h1>Tucker Fredricks (USA)</h1>
<h2>Personal Records</h2>
<table id="prs" class="records">
</table>
<p><a href="https://speedskatingresults.com/index.php?p=18&s=273">Results</a> from
<a href="https://speedskatingresults.com">SpeedskatingResults.com</a></p>
</body>
</html>
Native Language Names