Golang interface allowing to communicate with the Football-Data API to process football/soccer match information.
Go to file
Icedream 654ecca4c5 Merge pull request #1 from programaths/develop
Better abstraction & https://golang.org/doc/effective_go.html#commentary
2016-06-25 23:09:50 +02:00
.gitignore Initial commit. 2016-06-13 00:39:00 +02:00
.travis.yml travis: Remove the custom path hacks, we don't need them. 2016-06-13 00:41:28 +02:00
README.md Initial commit. 2016-06-13 00:39:00 +02:00
api_methods.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
api_types.go Add additional score info in FixtureResult. 2016-06-25 22:42:56 +02:00
api_url.go Initial commit. 2016-06-13 00:39:00 +02:00
client.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
example_test.go Failing test due to API divergence 2016-06-25 12:29:32 +02:00
req_fixture.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_fixtures.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_soccerseason.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_soccerseason_fixtures.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_soccerseason_leaguetable.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_soccerseason_teams.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_soccerseasons.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_team.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_team_fixtures.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
req_team_players.go Better abstraction & https://golang.org/doc/effective_go.html#commentary 2016-06-25 12:15:58 +02:00
response_meta.go Initial commit. 2016-06-13 00:39:00 +02:00
util.go Initial commit. 2016-06-13 00:39:00 +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
	client := footballdata.NewClient(http.DefaultClient)

	// Tell it to use our API token
	client.AuthToken = "<insert your api token here>"

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

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