ngx [.info]

Just another WordPress site

SpeedSkatingNews-REST-API

This API is an alpha version and still in development!

SpeedSkatingNews.info provides an easy to use REST-API that enables authorized customers to retrieve data from our database in realtime. The data are send as JSON-objects, XML-data or HTML-tables.

The API is allowed to be used for private and authorized purposes. In any case a credit to SpeedSkatingNews has to be set. The usage of the API will be monitored. An excessive usage is not permitted. SpeedSkatingNews does not guarantee any service quality level (data quality, reliability etc.). A guaranteed service quality (SLA) is given for professional users (paid access), only. This can be requested via the contact page.

Currently, the following functions are public available:

  • getSkater – get common skater information
  • getSeasonBest – get season best times of a skater
  • getPersonalBest – get personal best times of a skater
  • getRecord – get dedicated record values

By default the functions return results as JSON objects. The output type can be changed when using the format argument. Possible values are json, xml or html.

All functions have to be used with additional parameters to retrieve the corresponding result. In case of an error or a misconfigured URL a HTTP errorcode is returned.

Most common errorcodes:

200 => 'OK'
204 => 'No Content'
400 => 'Bad Request'
401 => 'Unauthorized'
403 => 'Forbidden'  
404 => 'Not Found'
405 => 'Method Not Allowed'
406 => 'Not Acceptable'  
501 => 'Not Implemented'

 

Method: getSkater

This function is used to retrieve basic information about a skater. The function expect to get at least one parameter to identify the skater.

  • skaterID
  • firstname and lastname (values are case-insensitive) with optional paramaters:
    • birthdate (format YYYY-MM-DD)
    • nation (three-digit code, e.g. GER, NED, USA etc.)
    • gender (m = male, f = female)

Whenever possible use the skaterID which is an unique identifier.

Usage examples:

https://www.speedskatingnews.inforest/getSkater/?skaterID=1496
https://www.speedskatingnews.inforest/getSkater/?name=ihle&firstname=nico
https://www.speedskatingnews.inforest/getSkater/?name=ihle&firstname=nico&birthdate=xxxx-xx-xx&nation=GER&gender=m
Output JSON:

{
    "0":{"skaterID":"1496","name":"Ihle","firstname":"Nico","gender":"m","nationality":"GER"}
}

or in case of multiple results (skaters with same name):

{
    "0":{"skaterID":"822","name":"Hartmann","firstname":"Heike","gender":"w","nationality":"GER"},
    "1":{"skaterID":"1318","name":"Hartmann","firstname":"Heike","gender":"w","nationality":"GER"}
}
Output XML:

<?xml version="1.0" encoding="UTF-8"?>
<speedskatingnews>
  <entry>
    <skaterID>1496</skaterID>
    <name>Ihle</name>
    <firstname>Nico</firstname>
    <gender>m</gender>
    <nationality>GER</nationality>
  </entry>
  <entry>
    ...
  </general>
</speedskatingnews>

 

Method: getSeasonBest

This function returns the season best(s) data of a skater. The function expect to get skaterID as required parameter. Additional parameters are:

  • distance – a single or allround distance name
    • single distance values: 100, 300, 500, 700, 1000, 1500, 3000, 5000, 10000
    • allround distance values:
      klein4
      500 / 3000 / 1500 / 5000
      mini4
      500 / 1500 / 1000 / 3000
      gross4
      500 / 5000 / 1500 / 10.000
      sprintoly
      2x 500 meter
      sprint4
      500 / 1000 / 500 / 1000
  • seasonprev previous season
  • rink – rink code, e.g. INH (Inzell), BER (Sportforum-Berlin), NLHE (Thialf Heerenveen) etc. Please check the rink page for all rink codes.

Get all available season bests of a skater with a given skaterID:

https://www.speedskatingnews.inforest/getSeasonBest/?skaterID=1496

The output is an object with all available distances and values. If no time/points are available n/a is returned.

Output JSON:

{
    "general":{"type":"SeasonBest","datestart":"2016-07-01","dateend":"2017-06-30","skaterID":1496},
    "distance":{
        "0":{"distance":100,"format":"time","value":"n\/a"},
        "1":{"distance":300,"format":"time","value":"23.060"},
        "2":{"distance":500,"format":"time","value":"34.370"},
        "3":{"distance":700,"format":"time","value":"n\/a"},
        "4":{"distance":1000,"format":"time","value":"1:07.160"},
        "5":{"distance":1500,"format":"time","value":"n\/a"},
        "6":{"distance":3000,"format":"time","value":"n\/a"},
        "7":{"distance":5000,"format":"time","value":"n\/a"},
        "8":{"distance":10000,"format":"time","value":"n\/a"},
        "9":{"distance":"klein4","format":"points","value":"n\/a"},
        "10":{"distance":"mini4","format":"points","value":"n\/a"},
        "11":{"distance":"gross4","format":"points","value":"n\/a"},
        "12":{"distance":"sprintoly","format":"points","value":"70,590"},
        "13":{"distance":"sprint4","format":"points","value":"136,855"}
    }
}
Output XML:

<?xml version="1.0" encoding="UTF-8"?>
<speedskatingnews>
  <general type="Season Best" datestart="2016-07-01" dateend="2017-06-30" skaterID="1496"/>
  <distance distance="100" format="time" value="n/a"/>
  <distance distance="300" format="time" value="23.060"/>
  <distance distance="500" format="time" value="34.370"/>
  <distance distance="700" format="time" value="n/a"/>
  <distance distance="1000" format="time" value="1:07.160"/>
  <distance distance="1500" format="time" value="n/a"/>
  <distance distance="3000" format="time" value="n/a"/>
  <distance distance="5000" format="time" value="n/a"/>
  <distance distance="10000" format="time" value="n/a"/>
  <distance distance="klein4" format="points" value="n/a"/>
  <distance distance="mini4" format="points" value="n/a"/>
  <distance distance="gross4" format="points" value="n/a"/>
  <distance distance="sprintoly" format="points" value="70,590"/>
  <distance distance="sprint4" format="points" value="136,855"/>
</speedskatingnews>
Get season best of a skater with a given skaterID for a specific distance: 

https://www.speedskatingnews.inforest/getSeasonBest/?skaterID=1496&distance=500 

Get season best of a skater with a given skaterID for a specific distance from the previous season: 

https://www.speedskatingnews.inforest/getSeasonBest/?skaterID=1496&distance=500&season=prev 

Get season best of a skater with a given skaterID for a specific distance and rink: 

https://www.speedskatingnews.inforest/getSeasonBest/?skaterID=1496&distance=500&rink=BER

 

Method: getPersonalBest

This function returns the personal best(s) of a skater. The function expect to get skaterID as required parameter. Please check out getSeasonBest for parmater and usage.

 

Method: getRecord

This function returns severals records. Three different recordtypes are available:

Offical records

The function requires a recordtype and the gender, like

https://www.speedskatingnews.inforest/getRecord/?competitionType=WR&gender=m

The function requires a type and a gender. Possible values for type are:

WR
World record
WRJ
Junior world record
OR
Olympic record
ER
European record
WCR
World cup record

Nation or country records

https://www.speedskatingnews.inforest/getRecord/?competitionType=NR&country=GER&gender=m

The function require a type, a three-digit country code and a gender. Possible values for type are:

NR
Nation record
NRJ
Junior nation record

Track records

https://www.speedskatingnews.inforest/getRecord/?competitionType=TR&rink=INH&gender=m

The function require a type=TR, a rink code and a gender. Please check the rink page for all rink codes.

Output JSON:

{
     "general":{"type":"Record TR","rink":"INH","gender":"m"},
     "distance":{
          "0":{"distance":100,"format":"time","value":"09.890"},
          "1":{"distance":300,"format":"time","value":"n\/a"},
          "2":{"distance":500,"format":"time","value":"34.320"},
          "3":{"distance":700,"format":"time","value":"n\/a"},
          "4":{"distance":1000,"format":"time","value":"1:08.310"},
          "5":{"distance":1500,"format":"time","value":"1:44.210"},
          "6":{"distance":3000,"format":"time","value":"3:38.030"},
          "7":{"distance":5000,"format":"time","value":"6:11.760"},
          "8":{"distance":10000,"format":"time","value":"12:48.200"},
          "9":{"distance":"klein4","format":"points","value":"154,152"},
          "10":{"distance":"mini4","format":"points","value":"149,303"},
          "11":{"distance":"gross4","format":"points","value":"155,511"},
          "12":{"distance":"sprintoly","format":"points","value":"69,100"},
          "13":{"distance":"sprint4","format":"points","value":"139,745"}
     }
}
Output XML:

<?xml version="1.0" encoding="UTF-8"?>
<speedskatingnews>
  <general type="Record TR" rink="INH" gender="m"/>
  <distance distance="100" format="time" value="09.890"/>
  <distance distance="300" format="time" value="n/a"/>
  <distance distance="500" format="time" value="34.320"/>
  <distance distance="700" format="time" value="n/a"/>
  <distance distance="1000" format="time" value="1:08.310"/>
  <distance distance="1500" format="time" value="1:44.210"/>
  <distance distance="3000" format="time" value="3:38.030"/>
  <distance distance="5000" format="time" value="6:11.760"/>
  <distance distance="10000" format="time" value="12:48.200"/>
  <distance distance="klein4" format="points" value="154,152"/>
  <distance distance="mini4" format="points" value="149,303"/>
  <distance distance="gross4" format="points" value="155,511"/>
  <distance distance="sprintoly" format="points" value="69,100"/>
  <distance distance="sprint4" format="points" value="139,745"/>
</speedskatingnews>

API Access

Currently, the REST-API ist not public available and a autorized access is required. Please fill out the form below to get your access data (username & password) to the API.

[caldera_form id=”CF58fcc125c3dcd”]