fbd

package module
v0.0.0-...-7d72752 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

README

FBD-downloader

Go library for downloading Football Bet Data exports programmatically.

Prerequisites

Usage

Install:

go get github.com/LonecastSystems/FBD-downloader

Import the package:

import fbd "github.com/LonecastSystems/FBD-downloader"

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.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidLeagues = map[Country][]string{
	ARGENTINA:    {"1"},
	AUSTRIA:      {"1", "2"},
	BELGIUM:      {"1", "2"},
	BRAZIL:       {"1"},
	BULGARIA:     {"1"},
	CHILE:        {"1"},
	CHINA:        {"1"},
	COLOMBIA:     {"1"},
	CROATIA:      {"1"},
	CZECH:        {"1", "2"},
	GERMANY:      {"1", "2", "3"},
	DENMARK:      {"1", "2"},
	ENGLAND:      {"0", "1", "2", "3", "C", "CN", "CS"},
	FINLAND:      {"1", "2"},
	FRANCE:       {"1", "2", "3"},
	GREECE:       {"1", "2"},
	HUNGARY:      {"1"},
	ICELAND:      {"1"},
	IRELAND:      {"1"},
	ITALY:        {"1", "2", "3"},
	JAPAN:        {"1", "2"},
	MEXICO:       {"1"},
	NETHERLANDS:  {"1", "2"},
	NORWAY:       {"1", "2"},
	PARAGUAY:     {"1"},
	POLAND:       {"1", "2"},
	PORTUGAL:     {"1", "2"},
	ROMANIA:      {"1"},
	RUSSIA:       {"1"},
	SOUTH_AFRICA: {"1"},
	SCOTLAND:     {"0", "1", "2", "3"},
	SINGAPORE:    {"1"},
	SLOVAKIA:     {"1", "2"},
	SPAIN:        {"1", "2"},
	SWITZERLAND:  {"1", "2"},
	SLOVENIA:     {"1"},
	SWEDEN:       {"1", "2"},
	TURKEY:       {"1", "2"},
	UKRAINE:      {"1"},
	USA:          {"1"},
	WALES:        {"1"},
}

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() (*Client, error)

func (*Client) NewDashboardConfigBuilder

func (c *Client) NewDashboardConfigBuilder() *dashboardConfigBuilder

func (*Client) NewFixturesConfigBuilder

func (c *Client) NewFixturesConfigBuilder() *fixturesConfigBuilder

func (*Client) SignIn

func (c *Client) SignIn(ctx context.Context, email, password string) error

func (*Client) SignOut

func (c *Client) SignOut(ctx context.Context) error

type Country

type Country string
const (
	ARGENTINA    Country = "AR"
	AUSTRIA      Country = "AU"
	BELGIUM      Country = "B"
	BOLIVIA      Country = "BO"
	BRAZIL       Country = "BR"
	BULGARIA     Country = "BU"
	CHILE        Country = "CH"
	CHINA        Country = "CN"
	COLOMBIA     Country = "CO"
	CROATIA      Country = "CR"
	CZECH        Country = "CZ"
	GERMANY      Country = "D"
	DENMARK      Country = "DE"
	ENGLAND      Country = "E"
	FINLAND      Country = "FI"
	FRANCE       Country = "FR"
	GREECE       Country = "G"
	HUNGARY      Country = "HU"
	ICELAND      Country = "IC"
	IRELAND      Country = "IR"
	ITALY        Country = "IT"
	JAPAN        Country = "J"
	MEXICO       Country = "MX"
	NETHERLANDS  Country = "N"
	NORWAY       Country = "NO"
	PARAGUAY     Country = "PA"
	POLAND       Country = "PL"
	PORTUGAL     Country = "PT"
	ROMANIA      Country = "RO"
	RUSSIA       Country = "RU"
	SOUTH_AFRICA Country = "SA"
	SCOTLAND     Country = "SC"
	SINGAPORE    Country = "SI"
	SLOVAKIA     Country = "SL"
	SPAIN        Country = "SP"
	SWITZERLAND  Country = "SU"
	SLOVENIA     Country = "SV"
	SWEDEN       Country = "SW"
	TURKEY       Country = "T"
	UKRAINE      Country = "UK"
	USA          Country = "US"
	WALES        Country = "WA"
)

type DashboardRange

type DashboardRange string
const (
	RangeHomeWinOdds           DashboardRange = "home_win_odds"
	RangeDrawOdds              DashboardRange = "draw_odds"
	RangeAwayWinOdds           DashboardRange = "away_win_odds"
	RangeGGOdds                DashboardRange = "gg_odds"
	RangeUnder25Odds           DashboardRange = "under_2_5_odds"
	RangeOver25Odds            DashboardRange = "over_2_5_odds"
	RangeAsianHomeOdds         DashboardRange = "asian_home_odds"
	RangeAsianDrawOdds         DashboardRange = "asian_draw_odds"
	RangeAsianAwayOdds         DashboardRange = "asian_away_odds"
	RangeDoubleChance1X        DashboardRange = "double_chance_1x_odds"
	RangeDoubleChance12        DashboardRange = "double_chance_12_odds"
	RangeDoubleChanceX2        DashboardRange = "double_chance_x2_odds"
	RangeDNBHomeOdds           DashboardRange = "draw_no_bet_home_odds"
	RangeDNBAwayOdds           DashboardRange = "draw_no_bet_away_odds"
	RangeOver05Odds            DashboardRange = "over_0_5_odds"
	RangeUnder05Odds           DashboardRange = "under_0_5_odds"
	RangeOver15Odds            DashboardRange = "over_1_5_odds"
	RangeUnder15Odds           DashboardRange = "under_1_5_odds"
	RangeOver35Odds            DashboardRange = "over_3_5_odds"
	RangeUnder35Odds           DashboardRange = "under_3_5_odds"
	RangeOver45Odds            DashboardRange = "over_4_5_odds"
	RangeUnder45Odds           DashboardRange = "under_4_5_odds"
	RangeBothTeamsScoreYesOdds DashboardRange = "bts_yes_odds"
	RangeBothTeamsScoreNoOdds  DashboardRange = "bts_no_odds"
)

type Month

type Month string
const (
	MonthJan Month = "fidJan"
	MonthFeb Month = "fidFeb"
	MonthMar Month = "fidMar"
	MonthApr Month = "fidApr"
	MonthMay Month = "fidMay"
	MonthJun Month = "fidJun"
	MonthJul Month = "fidJul"
	MonthAug Month = "fidAug"
	MonthSep Month = "fidSep"
	MonthOct Month = "fidOct"
	MonthNov Month = "fidNov"
	MonthDec Month = "fidDec"
)

type OddsType

type OddsType int
const (
	OddsTypeAverage OddsType = 1
	OddsTypeBetfair OddsType = 2
)

type Range

type Range struct {
	Min int
	Max int
}

type ScoreLine

type ScoreLine string
const (
	ScoreLine00 ScoreLine = "0 - 0"
	ScoreLine11 ScoreLine = "1 - 1"
	ScoreLine22 ScoreLine = "2 - 2"
	ScoreLine33 ScoreLine = "3 - 3"
	ScoreLine44 ScoreLine = "4 - 4"
	ScoreLine55 ScoreLine = "5 - 5"
	ScoreLine10 ScoreLine = "1 - 0"
	ScoreLine20 ScoreLine = "2 - 0"
	ScoreLine21 ScoreLine = "2 - 1"
	ScoreLine30 ScoreLine = "3 - 0"
	ScoreLine31 ScoreLine = "3 - 1"
	ScoreLine40 ScoreLine = "4 - 0"
	ScoreLine32 ScoreLine = "3 - 2"
	ScoreLine41 ScoreLine = "4 - 1"
	ScoreLine50 ScoreLine = "5 - 0"
	ScoreLine42 ScoreLine = "4 - 2"
	ScoreLine51 ScoreLine = "5 - 1"
	ScoreLine43 ScoreLine = "4 - 3"
	ScoreLine52 ScoreLine = "5 - 2"
	ScoreLine53 ScoreLine = "5 - 3"
	ScoreLine54 ScoreLine = "5 - 4"
	ScoreLine01 ScoreLine = "0 - 1"
	ScoreLine02 ScoreLine = "0 - 2"
	ScoreLine12 ScoreLine = "1 - 2"
	ScoreLine03 ScoreLine = "0 - 3"
	ScoreLine13 ScoreLine = "1 - 3"
	ScoreLine04 ScoreLine = "0 - 4"
	ScoreLine23 ScoreLine = "2 - 3"
	ScoreLine14 ScoreLine = "1 - 4"
	ScoreLine05 ScoreLine = "0 - 5"
	ScoreLine24 ScoreLine = "2 - 4"
	ScoreLine15 ScoreLine = "1 - 5"
	ScoreLine34 ScoreLine = "3 - 4"
	ScoreLine25 ScoreLine = "2 - 5"
	ScoreLine35 ScoreLine = "3 - 5"
	ScoreLine45 ScoreLine = "4 - 5"
)

func (ScoreLine) FieldKey

func (s ScoreLine) FieldKey() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL