Skip to content

Golang interface allowing to communicate with the Football-Data API to process football/soccer match information.

Notifications You must be signed in to change notification settings

icedream/go-footballdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Football-Data API for Golang

Build Status GoDoc

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 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)
	}
}

About

Golang interface allowing to communicate with the Football-Data API to process football/soccer match information.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages