A Ruby on Rails app that provides football data in JSON format. You can fork it and adjust to your own needs.
Use RVM or RBenv to install Ruby
curl -sSL https://get.rvm.io | bash -s stable
rvm install 2.2.1
git clone [email protected]:footballhackday/football-api.git
cd football-api
bundle
The organizers will provide you with sport data files in XML format. Put the files to the db/data directory.
cd db
unzip sport-data.zip
Copy .env.example to .env then edit the file and put your PUSHER_URL there.
cp .env.example .env
bundle exec rails s
The server will start listening on port 3000.
Open localhost:3000/api/leagues.json in your browser to check if it works.
The REST API is documented on Apiary.
You can use the app to simulate a live match. The application uses Pusher to publish match events. You can subscribe to the events in your client. See the docs to see how it works.
For example, you can replay Liverpool vs Manchester United action by action.
In order to start the replay run script/replay and supply the ID of the match you want to simulate.
bundle exec ruby script/replay.rb 1439948
Check out the wiki to see which matches you can simulate
It is easiest to use Heroku but of course you can use whatever you are familiar with.