https://github.com/tralahm/football-data.org
Football-Data.org Go API Client
https://github.com/tralahm/football-data.org
api-client football-data go golang
Last synced: about 2 months ago
JSON representation
Football-Data.org Go API Client
- Host: GitHub
- URL: https://github.com/tralahm/football-data.org
- Owner: TralahM
- License: gpl-3.0
- Created: 2021-03-21T01:02:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-26T22:09:12.000Z (over 4 years ago)
- Last Synced: 2025-01-13T08:45:21.931Z (10 months ago)
- Topics: api-client, football-data, go, golang
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.rst
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://travis-ci.com/TralahM/football-data.org)
[](https://opensource.org/licenses/GPLV2)
[](https://github.com/TralahTek)
[](https://github.com/TralahM/football-data.org/pull/)
[](https://github.com/TralahM/football-data.org/pull/)
[](https://github.com/TralahM)

# football-data.org.
A Go Client for the [Football-data.org](football-data.org) API.
# Installation
```console
# In terminal do:
$ go get -u github.com/tralahm/football-data.org
```
## Usage
```go
package main
import (
"fmt"
football_data "github.com/tralahm/football-data.org"
)
func main() {
XAuthToken := "your football-data api key"
apiClient := football_data.NewAPIClient(XAuthToken)
leaguesResponse := apiClient.GetLeagues()
fmt.Println(leaguesResponse.Competitions[0])
LeagueID := "2018"
competition := apiClient.GetLeague(LeagueID)
fmt.Println(competition)
gamesResponse := apiClient.GetGames(LeagueID)
fmt.Println(gamesResponse.Matches[0])
teamsResponse := apiClient.GetTeams(LeagueID)
fmt.Println(teamsResponse.Teams[0])
GameID := "239019"
gameR := apiClient.GetGameDetails(GameID)
fmt.Println(gameR.Head2Head, gameR.Match)
standingsResponse := apiClient.GetLeague(LeagueID)
fmt.Println(standingsResponse.Standings[0])
}
```
# LICENCE
[Read the license here](LICENSE)
# Self-Promotion
[](https://github.com/TralahM)
[](https://twitter.com/TralahM)
[](https://kaggle.com/TralahM)
[](https://linkedin.com/in/TralahM)
[](https://tralahm.tralahtek.com)
[](https://org.tralahtek.com)