Hello,
FYI: I've updated the sport.db.starter kit (Ruby Edition) [1].
What's the sport.db.starter kit?
A ready-to-use sample to get started building your own HTTP JSON API
for sports (e.g. World Cup, Euro, English Premier League, Bundesliga,
etc.)
What's news?
I've cleaned up the code to make it easier to get started and
change as needed, for example:
To start the sample web service there's no longer a rackup config.ru
(might confuse newbies - what's rack anyway?) - now just use:
$ ruby server.rb
I moved the database configuration into config/database.yml e.g.
development:
adapter: sqlite3
database: football.db
Last but not least I added two new sample services, that is, / and /events.
The /events service lists all events in your database you can use
for /events/:key/teams|rounds and so on.
The / (index) service lists all endpoints (services) e.g.
{
"endpoints": {
"list_events": {
"doc": "list all events",
"url": "/events"
},
"list_event_teams": {
"doc": "list teams for an event",
"url": "/event/:key/teams"
},
"list_event_rounds": {
"doc": "list rounds for an event",
"url": "/event/:key/rounds"
},
"list_event_games_for_round": {
"doc": "list games for an event round",
"url": "/event/:key/round/:pos"
}
}
}
The idea is kind of little builtin self-docu. That's it. Enjoy. All
scripts and datasets public domain (no rights reserved; use as you
please.) Cheers.