Introduction
This football API is available to query with every match from the Premier League to the Conference Premier, with every football result since 1994, fixtures, out in built ELO Rating System (http://en.wikipedia.org/wiki/Elo_rating_system) and more. This years results also includes some stats, like corners, red cards, shots, shots on target, half time score, and even the highest, lowest and average betting site odds (win, draw, lose, over 2.5 goals, under 2.5 goals and total goals) from before pre match
If you'd like an API key to play with this beta API yourself, just email us at "footballapi@{this domain}" with a brief description on what you'd like to use it for. Maybe you'd like to use it for some automatic gambling statistic, creating your own football prediction league, or anything else that you can think of.
Emails will be going out early July if you have been accepted to the beta testing.
The examples on this site will be in C#.
Basic Usage
Once you have added a reference to the API, all you need to do is:
using (var service = new TheBoF.TheBofService())
{
// what date to search for
DateTime dateSelected = new DateTime(2013, 2, 23);
var matches = service.GetMatches(new TheBof.MatchRequest
{
APIKey = "{Insert API Key}",
MatchFilter = new TestBoF.MatchFilter()
{
// 1 = result, 0 = fixture
MatchStatus = 1,
// what competition
Competition = 2,
// the date to bring back
DateSelected = dateSelected
},
PreviousResultsRequest = new TheBof.PreviousResultsRequest
{
// want the teams home / away / overall form?
// how many matches?
MatchCount = 2
}
});
// have any errors been returned?
if (matches.Response.Success == true)
{
// loop through the matches
foreach (var match in matches.Matches)
{
print out the matchkeys e.g.: match.MatchKey
}
}
else
{
// error occured!
// use matches.Response.AdditionalInformation for more information
}
}
Simple As!