API - Seed Times

Retrieve a skater's best times for a specific date range (e.g. for use as seed times for a competition).

URL

Parameters

Type URL
XML http://speedskatingresults.com/api/xml/seed_times.php
JSON http://speedskatingresults.com/api/json/seed_times.php
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:

http://speedskatingresults.com/index.php?p=17&s=203

startDate range start (required). The value should have the format YYYY-MM-DD (year-month-day).
startDate range end (required). The value should have the format YYYY-MM-DD (year-month-day).
distance

Distance (optional)

When the distance parameter is omitted, the seed times for all distances are returned. Specify a value (500, 1000, 1500, 3000, 5000 or 10000) for the distance parameter to retrieve the seed time for that distance only.

Skater IDs

XML

Element Description
seedtimes

The collection of seed times

Attributes

  • skater - skater ID
resultThe best result for a diestance
distanceRace distance
timeFinishing time
dateRace date (YYYY-MM-DD)
locationRace location

Example

API Query: http://speedskatingresults.com/api/xml/seed_times?skater=11433&start=2011-01-01&end=2012-12-31

<?xml version="1.0" encoding="utf-8" ?>
<seedtimes skater="11433">
  <result>
    <distance>500</distance>
    <time>37,36</time>
    <date>2012-02-18</date>
    <location>Moscow (RUS)</location>
  </result>
  <result>
    <distance>1500</distance>
    <time>1.49,09</time>
    <date>2011-11-18</date>
    <location>Chelyabinsk (RUS)</location>
  </result>
  <result>
    <distance>3000</distance>
    <time>3.39,43</time>
    <date>2012-08-12</date>
    <location>Calgary (CAN)</location>
  </result>
  <result>
    <distance>5000</distance>
    <time>6.17,45</time>
    <date>2011-03-11</date>
    <location>Inzell (GER)</location>
  </result>
  <result>
    <distance>10000</distance>
    <time>12.57,27</time>
    <date>2011-02-19</date>
    <location>Salt Lake City (USA)</location>
  </result>
</seedtimes>

JSON

Key Description
skater skater ID
times The collection of seed times
distanceRace distance
timeFinishing time
dateRace date (YYYY-MM-DD)
locationRace location

Example

API Query: http://speedskatingresults.com/api/json/seed_times?skater=11433&start=2011-01-01&end=2012-12-31

{
  "skater":11433,
  "times":[
    {"distance":500, "time":"37,36", "date":"2012-02-18", "location":"Moscow (RUS)"},
    {"distance":1500, "time":"1.49,09", "date":"2011-11-18", "location":"Chelyabinsk (RUS)"},
    {"distance":3000, "time":"3.39,43", "date":"2012-08-12", "location":"Calgary (CAN)"},
    {"distance":5000, "time":"6.17,41", "date":"2012-11-24", "location":"Kolomna (RUS)"},
    {"distance":10000, "time":"12.57,27", "date":"2011-02-19", "location":"Salt Lake City (USA)"}
  ]
}

Example Web Page

Though it is expected that the seed times API method will be used by a web application and not to directly show the information on a web page, the sample web page below shows a usage example for the API method. It makes use of the jQuery library to handle the the interaction with the XML API.

Seed Times Example Page (XML)

Seed Times Example Page (JSON)

HTML Code (XML)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<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 - Seed Times</title>
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
    $.ajax({
      type: "GET",
      url: "http://speedskatingresults.com/api/xml/seed_times.php",
      data: "skater=11433&start=2010-07-01&end=2012-06-30",
      dataType: "xml",
      success: function(xml) {
        $(xml).find('result').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('#sts');
        });
      }
    });
  });
  </script>
</head>
<body>
  <h1>Seung-Hoon Lee (KOR)</h1>
  <h2>Seed Times (1 July 2010 - 30 June 2012)</h2>
  <table id="sts" class="records">
  </table>
  <p><a href="http://speedskatingresults.com/index.php?p=18&s=11433">Results</a> from
    <a href="http://speedskatingresults.com">SpeedskatingResults.com</a></p>
</body>
</html>

HTML Code (JSON)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<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 - Seed Times</title>
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
    $.ajax({
      type: "GET",
      url: "http://speedskatingresults.com/api/json/seed_times.php",
      data: "skater=11433&start=2010-07-01&end=2012-06-30",
      dataType: "json",
      success: function(data) {
        data.times.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('#sts');
        });
      }
    });
  });
  </script>
</head>
<body>
  <h1>Seung-Hoon Lee (KOR)</h1>
  <h2>Seed Times (1 July 2010 - 30 June 2012)</h2>
  <table id="sts" class="records">
  </table>
  <p><a href="http://speedskatingresults.com/index.php?p=18&s=11433">Results</a> from
    <a href="http://speedskatingresults.com">SpeedskatingResults.com</a></p>
</body>
</html>
SpeedskatingResults.com on Facebook