Skip to content
spllr edited this page Jul 17, 2011 · 1 revision

About

The Race App requires a server to share the game results and store the tracks.

Checkout the server branch for the game server.

The server is implemented with Padrino on Ruby 1.9.2.

In the branch you will find a README explaining how to deploy the game server to heroku.

API

The server has the following API:

GET /tracks.json

Returns all the tracks

POST /tracks/create.json --data "name=TrackName&data=[{"lat":123,"lon":456}]"

Creates a new track

GET /tracks/1.json

Returns the data of a single track

POST /tracks/1/start.json --data "username=emma"

Starts a race on a track.

Returns the path to stop the race.

POST /tracks/1/races/1/stop.json --data "time=600"

Stops a race.

Returns the winner and the best time.

GET/POST /search.json?q=Amsterdam

Returns tracks nearby the passed location.