https://github.com/icedream/go-footballdata
Golang interface allowing to communicate with the Football-Data API to process football/soccer match information.
https://github.com/icedream/go-footballdata
football footballdata go golang library
Last synced: 3 months ago
JSON representation
Golang interface allowing to communicate with the Football-Data API to process football/soccer match information.
- Host: GitHub
- URL: https://github.com/icedream/go-footballdata
- Owner: icedream
- Created: 2016-06-12T22:36:55.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-04-06T05:08:51.000Z (about 3 years ago)
- Last Synced: 2025-10-13T17:38:18.036Z (8 months ago)
- Topics: football, footballdata, go, golang, library
- Language: Go
- Size: 61.5 KB
- Stars: 19
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Football-Data API for Golang
[](https://travis-ci.org/icedream/go-footballdata)
[](https://godoc.org/github.com/icedream/go-footballdata)
This library provides functionality to communicate with the API provided by http://football-data.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](http://api.football-data.org/register) 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:
```go
package main
import (
"fmt"
"net/http"
"github.com/icedream/go-footballdata"
)
func main() {
// Create client (optionally with auth token)
client := new(footballdata.Client).
WithToken("")
// 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)
}
}
```