sport.db HTTP JSON(P) API

<%= erb :'_football_today' %>

Examples

<% example_event_keys = ['world.confed.2013', 'en.2012_13', 'de.2012_13', 'euro.2012', 'world.2010'] example_round_pos = [ 4, 2, 5, 1, 20 ] example_round_label = [ '4th Round (=> Semi-finals)', '2nd Round', '5th Round', '1st Round', '20th Round (=> Final)' ] %>

List all teams for an event (league+season) /event/:key/teams

<% example_event_keys.each do |event_key| event = Event.find_by_key!( event_key.tr('_', '/') ) %> <% end %>
/event/<%= event_key %>/teams <%= event.full_title %>

List all rounds for an event (league+season) /event/:key/rounds

<% example_event_keys.each do |event_key| event = Event.find_by_key!( event_key.tr('_', '/') ) %> <% end %>
/event/<%= event_key %>/rounds <%= event.full_title %>

List all rounds for today or a date /rounds/today|:YYYY.MM.DD

/rounds/today All rounds scheduled for today
/rounds/2013.6.30 All rounds scheduled for July 30th, 2013

List all games in a round for an event (league+season) /event/:key/round/:pos|today

<% example_event_keys.each_with_index do |event_key, index| event = Event.find_by_key!( event_key.tr('_', '/') ) %> <% end %>
/event/<%= event_key %>/round/<%= example_round_pos[index] %> <%= event.full_title %> - <%= example_round_label[index] %>
/event/de.2013_14/round/today Deutsche Bundesliga 2013/14 - all games for today's round (or if no round scheduled for today the last one or if no last one the next upcoming one).
<%= erb :'_usage' %> <%= erb :'_football_live' %>

About

What's sport.db?

A free open sports database & schema. More »

What's sport.db.api?

A free open source web service in Ruby w/ Sinatra. More »

<% if params[:debug].present? %> <%= erb :'_debug' %> <% end %>