(Ak: Uusi sivu: ==Rest API== Replace "live.enymind.fi" with your own address. ===Get all races=== http://live.enymind.fi/get.php '''Content-type:''' text/plain '''Example response:''' 1|Race 1 …)
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Rest API==
 
==Rest API==
  
Replace "live.enymind.fi" with your own address.
+
Replace "demo.live.enymind.fi" with your own personal live address.
  
 
===Get all races===
 
===Get all races===
  http://live.enymind.fi/get.php
+
  http://demo.live.enymind.fi/rest/races
  
'''Content-type:''' text/plain
+
'''Content-type:''' application/json
  
 
'''Example response:'''
 
'''Example response:'''
  1|Race 1
+
  [
2|Race 2
+
  ["52", "Test competition", "2013-04-15 09:00:00"],
  3|Race 3
+
  ["53", "Enduro race Summer 2015", "2014-03-14 10:00:00"],
 +
  ["54", "Demo GNCC Race, Oct 10. 2014", "2014-10-10 12:00:00"]
 +
  ]
  
 
===Get all rounds from race===
 
===Get all rounds from race===
  http://live.enymind.fi/live/api.php?rounds&cid=1
+
  http://demo.live.enymind.fi/rest/rounds&cid=54
  
 
'''Where parameters:'''
 
'''Where parameters:'''
Line 24: Line 26:
 
  [
 
  [
 
   ["1051", "Lähtö 1"],
 
   ["1051", "Lähtö 1"],
   ["1052", "Lähtö 2"],
+
   ["1052", "Lähtö 2"]
  ["1055", "FEEDTEST Run 1"]
+
 
  ]
 
  ]
  
 
===Get results from a round===
 
===Get results from a round===
  http://live.enymind.fi/live/api.php?ajax&cid=1&rid=1
+
  http://demo.live.enymind.fi/rest/results&cid=54&rid=1051
  
 
'''Where parameters:'''
 
'''Where parameters:'''

Latest revision as of 20:50, 27 September 2016

Rest API

Replace "demo.live.enymind.fi" with your own personal live address.

Get all races

http://demo.live.enymind.fi/rest/races

Content-type: application/json

Example response:

[
 ["52", "Test competition", "2013-04-15 09:00:00"],
 ["53", "Enduro race Summer 2015", "2014-03-14 10:00:00"],
 ["54", "Demo GNCC Race, Oct 10. 2014", "2014-10-10 12:00:00"]
]

Get all rounds from race

http://demo.live.enymind.fi/rest/rounds&cid=54

Where parameters:

  • cid: race id

Content-type: application/json

Example response:

[
 ["1051", "Lähtö 1"],
 ["1052", "Lähtö 2"]
]

Get results from a round

http://demo.live.enymind.fi/rest/results&cid=54&rid=1051

Where parameters:

  • cid: race id
  • rid: round id

Content-type: application/json

Example response:

["FEEDTEST Run 1", "00:15:08", "Race!", "qualificationResults",
 [
  ["11193", " ", "6", "Empty", "10", "00:00:22.253", "1"],
  ["11196", " ", "9", "Empty", "10", "00:00:22.591", "1"],
  ["11188", " ", "1", "Empty", "10", "00:00:23.300", "1"]
 ]
]