Skip to content

LonecastSystems/fbd-go

Repository files navigation

FBD

Go library for downloading Football Bet Data exports programmatically.

Prerequisites

Usage

Install:

go get github.com/LonecastSystems/fbd-go

Import the package:

import fbd "github.com/LonecastSystems/fbd-go"

Basic flow (with os imported):

client, err := fbd.NewClient()
if err != nil {
    // handle error
}

if err := client.SignIn(username, password); err != nil {
    // handle error
}
defer client.SignOut()

dashboardBytes, err := client.NewDashboardConfigBuilder().
    WithMatchesNoPrediction().
    WithLeagues(map[fbd.Country][]string{fbd.ENGLAND: {"1", "2"}}).
    WithSummerSeasons([]int{2025}).
    WithWinterSeasons([]int{2025}).
    Build().
    ExportToExcel()
if err != nil {
    // handle error
}

if err := os.WriteFile("dashboard.xlsx", dashboardBytes, 0644); err != nil {
    // handle error
}

Notes

  • Keep credentials out of source code. Read them from environment variables or your secrets manager.

About

football-bet-data library to download excel files (Dashboard and fixtures for now)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages