Golang interface allowing to communicate with the Football-Data API to process football/soccer match information.
Go to file
Icedream 91b031b34c
Travis: Remove invalid "release" Go version and add Go 1.7 for testing.
2016-09-04 13:43:15 +02:00
.gitignore Initial commit. 2016-06-13 00:39:00 +02:00
.travis.yml Travis: Remove invalid "release" Go version and add Go 1.7 for testing. 2016-09-04 13:43:15 +02:00
README.md Update examples to use Competition instead of SoccerSeason. 2016-07-09 21:06:13 +02:00
api_methods.go Remove intermediate interface and provide Set methods for HttpClient and Token. 2016-06-26 12:57:14 +02:00
api_types.go Make TeamLeagueStatistics.PlayedGames a uint8 instead of a uint16. 2016-07-09 21:41:07 +02:00
api_url.go Initial commit. 2016-06-13 00:39:00 +02:00
client.go Provide fluent-style configuration methods as alternatives to the Set methods. 2016-06-26 13:04:04 +02:00
client_test.go Add two quick Client construction tests. 2016-09-04 13:28:39 +02:00
example_test.go Update examples to use Competition instead of SoccerSeason. 2016-07-09 21:06:13 +02:00
req_competition.go Deprecate Soccerseason methods and structs in favor of the Competition model. 2016-07-09 20:59:24 +02:00
req_competition_fixtures.go Fix copypasta fail. 2016-07-09 21:46:45 +02:00
req_competition_leaguetable.go Fix return value of LeagueTable methods. 2016-07-09 21:26:07 +02:00
req_competition_teams.go Deprecate Soccerseason methods and structs in favor of the Competition model. 2016-07-09 20:59:24 +02:00
req_competitions.go Clarification of documentation for "Competitions" and "SoccerSeasons" methods. 2016-07-09 21:35:29 +02:00
req_fixture.go Remove intermediate interface and provide Set methods for HttpClient and Token. 2016-06-26 12:57:14 +02:00
req_fixtures.go Fix copypasta fail. 2016-07-09 21:46:45 +02:00
req_soccerseason.go Deprecate Soccerseason methods and structs in favor of the Competition model. 2016-07-09 20:59:24 +02:00
req_soccerseason_fixtures.go Deprecate Soccerseason methods and structs in favor of the Competition model. 2016-07-09 20:59:24 +02:00
req_soccerseason_leaguetable.go Fix return value of LeagueTable methods. 2016-07-09 21:26:07 +02:00
req_soccerseason_teams.go Deprecate Soccerseason methods and structs in favor of the Competition model. 2016-07-09 20:59:24 +02:00
req_soccerseasons.go Clarification of documentation for "Competitions" and "SoccerSeasons" methods. 2016-07-09 21:35:29 +02:00
req_team.go Remove intermediate interface and provide Set methods for HttpClient and Token. 2016-06-26 12:57:14 +02:00
req_team_fixtures.go Remove intermediate interface and provide Set methods for HttpClient and Token. 2016-06-26 12:57:14 +02:00
req_team_players.go Remove intermediate interface and provide Set methods for HttpClient and Token. 2016-06-26 12:57:14 +02:00
response_meta.go Initial commit. 2016-06-13 00:39:00 +02:00
util.go Implement "timeFrameStart" and "timeFrameEnd" filters for fixtures. 2016-07-09 21:41:55 +02:00
util_test.go Initial commit. 2016-06-13 00:39:00 +02:00

README.md

Football-Data API for Golang

Build Status GoDoc

This library provides functionality to communicate with the API provided by http://football-api.org. This way programs can use data provided by the API in order to show information about football/soccer games from various seasons for free.

How to use this library?

Before you use this library please register for a free API key in order to increase your usage limits. The library also works without an API key.

You can install this library by running:

go get github.com/icedream/go-footballdata

Afterwards you can use this library like this:

package main

import (
	"fmt"
	"net/http"

	"github.com/icedream/go-footballdata"
)

func main() {
	// Create client (optionally with auth token)
	client := new(footballdata.Client).
		WithToken("<insert your api token here>")

	// Get list of seasons...
	competitions, err := client.Competitions().Do()
	if err != nil {
		panic(err)
	}

	// ...and print them
	for _, competition := range competitions {
		fmt.Println(competition.Id, competition.Caption)
	}
}