(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 …) |
|||
Line 4: | Line 4: | ||
===Get all races=== | ===Get all races=== | ||
− | http://live.enymind.fi/ | + | http://live.enymind.fi/live/api.php?races |
− | '''Content-type:''' | + | '''Content-type:''' application/json |
'''Example response:''' | '''Example response:''' | ||
− | + | [ | |
− | + | ["11", "Test competition"], | |
− | + | ["12", "Enduro race Summer 2015"], | |
+ | ["13", "Winter Motocross cup"] | ||
+ | ] | ||
===Get all rounds from race=== | ===Get all rounds from race=== | ||
Line 29: | Line 31: | ||
===Get results from a round=== | ===Get results from a round=== | ||
− | http://live.enymind.fi/live/api.php? | + | http://live.enymind.fi/live/api.php?results&cid=1&rid=1 |
'''Where parameters:''' | '''Where parameters:''' |
Revision as of 18:25, 7 May 2015
Rest API
Replace "live.enymind.fi" with your own address.
Get all races
http://live.enymind.fi/live/api.php?races
Content-type: application/json
Example response:
[ ["11", "Test competition"], ["12", "Enduro race Summer 2015"], ["13", "Winter Motocross cup"] ]
Get all rounds from race
http://live.enymind.fi/live/api.php?rounds&cid=1
Where parameters:
- cid: race id
Content-type: application/json
Example response:
[ ["1051", "Lähtö 1"], ["1052", "Lähtö 2"], ["1055", "FEEDTEST Run 1"] ]
Get results from a round
http://live.enymind.fi/live/api.php?results&cid=1&rid=1
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"] ] ]