gaf

package module
v0.0.0-...-605f477 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

Go client for api-football.com

Use this simple client if you want to use REST API v3 api-football.com

How to use

Just import

import (
	"github.com/badkaktus/go-api-football"
)

Create client

gafClient := gaf.NewClient("token")

Example

Get teams (endpoint: /teams)

req := gaf.TeamsOptions{
    Id: 621,
}
team, err := gafClient.GetTeams(context.Background(), &req)

if err != nil {
	return fmt.Fprintf("%+v", err)
}

Not all endpoints have been added to the client at the moment.

List of added endpoints:

Endpoints Route Method Struct with options for method
Status /status GetStatus -
Teams information /teams GetTeams TeamsOptions
Teams statistics /teams/statistics GetTeamStatistics TeamStatisticsOption
Teams seasons /teams/seasons GetTeamSeasons TeamSeasonsOptions
Venues /venues GetVenues VenuesOptions
Standings /standings GetStandings StandingsOptions
Fixtures /fixtures GetFixtures FixturesOptions
Fixtures head To head /fixtures/headtohead GetHead2Head Head2HeadOptions
Fixtures statistics /fixtures/statistics GetFixturesStatistics FixturesStatisticsOptions
Fixtures events /fixtures/events GetFixturesEvents FixturesEventsOptions
Fixtures lineups /fixtures/lineups GetFixturesLineups FixturesLineupsOptions
Fixtures players statistics /fixtures/players GetFixturesPlayers FixturesPlayersOptions
Predictions /predictions GetPredictions PredictionsOptions
Coachs /coachs GetCoachs CoachsOptions
Transfers /transfers GetTranfers TransfersOptions
Sidelined /sidelined GetSidelined SidelinedOptions
Odds (In-Play) /odds/live GetOddsLive OddsLiveOptions

Documentation

Index

Constants

View Source
const (
	Protocol     = "https"
	BaseDomainV3 = "v3.football.api-sports.io"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllStandings

type AllStandings struct {
	Played int             `json:"played"`
	Win    int             `json:"win"`
	Draw   int             `json:"draw"`
	Lose   int             `json:"lose"`
	Goals  GoalsForAgainst `json:"goals"`
}

type Biggest

type Biggest struct {
	Streak WinsDrawsLoses `json:"streak"`
	Wins   HomeAwayString `json:"wins"`
	Loses  HomeAwayString `json:"loses"`
	Goals  BiggestGoals   `json:"goals"`
}

type BiggestGoals

type BiggestGoals struct {
	For     Goals `json:"for"`
	Against Goals `json:"against"`
}

type Birth

type Birth struct {
	Date    string `json:"date"`
	Place   string `json:"place"`
	Country string `json:"country"`
}

type Cards

type Cards struct {
	Yellow IntervalStats `json:"yellow"`
	Red    IntervalStats `json:"red"`
}

type CardsStats

type CardsStats struct {
	Yellow int `json:"yellow"`
	Red    int `json:"red"`
}

type CareerRow

type CareerRow struct {
	Team  TeamShortInfo `json:"team"`
	Start string        `json:"start"`
	End   string        `json:"end"`
}

type Client

type Client struct {
	BaseURL string

	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string) *Client

func (*Client) GetCoachs

func (c *Client) GetCoachs(ctx context.Context, options *CoachsOptions) (*Coachs, error)

func (*Client) GetFixtures

func (c *Client) GetFixtures(ctx context.Context, options *FixturesOptions) (*Fixtures, error)

func (*Client) GetFixturesEvents

func (c *Client) GetFixturesEvents(ctx context.Context, options *FixturesEventsOptions) (*FixturesEvents, error)

func (*Client) GetFixturesLineups

func (c *Client) GetFixturesLineups(ctx context.Context, options *FixturesLineupsOptions) (*FixturesLineups, error)

func (*Client) GetFixturesPlayers

func (c *Client) GetFixturesPlayers(ctx context.Context, options *FixturesPlayersOptions) (*FixturesPlayers, error)

func (*Client) GetFixturesStatistics

func (c *Client) GetFixturesStatistics(ctx context.Context, options *FixturesStatisticsOptions) (*FixturesStatistics, error)

func (*Client) GetHead2Head

func (c *Client) GetHead2Head(ctx context.Context, options *Head2HeadOptions) (*Fixtures, error)

func (*Client) GetOddsLive

func (c *Client) GetOddsLive(ctx context.Context, options *OddsLiveOptions) (*OddsLive, error)

func (*Client) GetPredictions

func (c *Client) GetPredictions(ctx context.Context, options *PredictionsOptions) (*Predictions, error)

func (*Client) GetSidelined

func (c *Client) GetSidelined(ctx context.Context, options *SidelinedOptions) (*Sidelined, error)

func (*Client) GetStandings

func (c *Client) GetStandings(ctx context.Context, options *StandingsOptions) (*Standings, error)

func (*Client) GetStatus

func (c *Client) GetStatus(ctx context.Context) (*StatusResponse, error)

func (*Client) GetTeamSeasons

func (c *Client) GetTeamSeasons(ctx context.Context, options *TeamSeasonsOptions) (*[]int, error)

func (*Client) GetTeamStatistics

func (c *Client) GetTeamStatistics(ctx context.Context, options *TeamStatisticsOption) (*TeamStatistics, error)

func (*Client) GetTeams

func (c *Client) GetTeams(ctx context.Context, options *TeamsOptions) (*Teams, error)

func (*Client) GetTranfers

func (c *Client) GetTranfers(ctx context.Context, options *TransfersOptions) (*Transfers, error)

func (*Client) GetVenues

func (c *Client) GetVenues(ctx context.Context, options *VenuesOptions) (*Venues, error)

type Coachs

type Coachs []struct {
	ID          int           `json:"id"`
	Name        string        `json:"name"`
	Firstname   string        `json:"firstname"`
	Lastname    string        `json:"lastname"`
	Age         int           `json:"age"`
	Birth       Birth         `json:"birth"`
	Nationality string        `json:"nationality"`
	Height      string        `json:"height"`
	Weight      string        `json:"weight"`
	Photo       string        `json:"photo"`
	Team        TeamShortInfo `json:"team"`
	Career      []CareerRow   `json:"career"`
}

type CoachsOptions

type CoachsOptions struct {
	Id     int    `json:"id" url:"id,omitempty"`
	Team   int    `json:"team" url:"team,omitempty"`
	Search string `json:"search" url:"search,omitempty"`
}

type Colors

type Colors struct {
	Player     PlayerColors `json:"player"`
	Goalkeeper PlayerColors `json:"goalkeeper"`
}

type Comparison

type Comparison struct {
	Form                HomeAwayString `json:"form"`
	Att                 HomeAwayString `json:"att"`
	Def                 HomeAwayString `json:"def"`
	PoissonDistribution HomeAwayString `json:"poisson_distribution"`
	H2H                 HomeAwayString `json:"h2h"`
	Goals               HomeAwayString `json:"goals"`
	Total               HomeAwayString `json:"total"`
}

type DribblesStats

type DribblesStats struct {
	Attempts int `json:"attempts"`
	Success  int `json:"success"`
	Past     int `json:"past"`
}

type DuelsStats

type DuelsStats struct {
	Total int `json:"total"`
	Won   int `json:"won"`
}

type Fixture

type Fixture struct {
	ID        int            `json:"id"`
	Referee   string         `json:"referee"`
	Timezone  string         `json:"timezone"`
	Date      time.Time      `json:"date"`
	Timestamp int            `json:"timestamp"`
	Periods   Periods        `json:"periods"`
	Venue     VenueShortInfo `json:"venue"`
	Status    Status         `json:"status"`
}

type FixtureOddsLive

type FixtureOddsLive struct {
	ID     int    `json:"id"`
	Status Status `json:"status"`
}

type FixtureTime

type FixtureTime struct {
	Elapsed int `json:"elapsed"`
	Extra   int `json:"extra"`
}

type Fixtures

type Fixtures []struct {
	Fixture Fixture        `json:"fixture"`
	League  LeagueInfo     `json:"league"`
	Teams   TeamsFixture   `json:"teams"`
	Goals   Goals          `json:"goals"`
	Score   ScoreInFixture `json:"score"`
}

type FixturesEvents

type FixturesEvents []struct {
	Time     FixtureTime   `json:"time"`
	Team     TeamShortInfo `json:"team"`
	Player   Player        `json:"player"`
	Assist   Player        `json:"assist"`
	Type     string        `json:"type"`
	Detail   string        `json:"detail"`
	Comments string        `json:"comments"`
}

type FixturesEventsOptions

type FixturesEventsOptions struct {
	Fixture int    `json:"fixture" url:"fixture"`
	Team    int    `json:"team" url:"team,omitempty"`
	Type    string `json:"type" url:"type,omitempty"`
	Player  int    `json:"player" url:"player,omitempty"`
}

type FixturesLineups

type FixturesLineups []struct {
	Team        TeamFixtureFullInfo `json:"team"`
	Formation   string              `json:"formation"`
	StartXI     []Lineups           `json:"startXI"`
	Substitutes []Lineups           `json:"substitutes"`
	Coach       PlayerWithPhoto     `json:"coach"`
}

type FixturesLineupsOptions

type FixturesLineupsOptions struct {
	Fixture int    `json:"fixture" url:"fixture"`
	Team    int    `json:"team" url:"team,omitempty"`
	Type    string `json:"type" url:"type,omitempty"`
	Player  int    `json:"player" url:"player,omitempty"`
}

type FixturesOptions

type FixturesOptions struct {
	Id       int    `json:"id" url:"id,omitempty"`
	Ids      string `json:"ids" url:"ids,omitempty"`
	Live     string `json:"live" url:"live,omitempty"`
	Date     string `json:"date" url:"date,omitempty"`
	League   int    `json:"league" url:"league,omitempty"`
	Season   int    `json:"season" url:"season,omitempty"`
	Team     int    `json:"team" url:"team,omitempty"`
	Last     int    `json:"last" url:"last,omitempty"`
	Next     int    `json:"next" url:"next,omitempty"`
	From     string `json:"from" url:"from,omitempty"`
	To       string `json:"to" url:"to,omitempty"`
	Round    string `json:"round" url:"round,omitempty"`
	Status   string `json:"status" url:"status,omitempty"`
	Venue    int    `json:"venue" url:"venue,omitempty"`
	Timezone string `json:"timezone" url:"timezone,omitempty"`
}

type FixturesPlayers

type FixturesPlayers []struct {
	Team    TeamShortInfo       `json:"team"`
	Players []PlayerFixtureInfo `json:"players"`
}

type FixturesPlayersOptions

type FixturesPlayersOptions struct {
	Fixture int `json:"fixture" url:"fixture"`
	Team    int `json:"team" url:"team,omitempty"`
}

type FixturesStatistics

type FixturesStatistics []struct {
	Team       TeamShortInfo        `json:"team"`
	Statistics []TypeValueStatistic `json:"statistics"`
}

type FixturesStatisticsOptions

type FixturesStatisticsOptions struct {
	Fixture int    `json:"fixture" url:"fixture"`
	Team    int    `json:"team" url:"team,omitempty"`
	Type    string `json:"type" url:"type,omitempty"`
}

type FormationPlayed

type FormationPlayed struct {
	Formation string `json:"formation"`
	Played    int    `json:"played"`
}

type FoulsStats

type FoulsStats struct {
	Drawn     int `json:"drawn"`
	Committed int `json:"committed"`
}

type GameStatistic

type GameStatistic struct {
	Minutes    int    `json:"minutes"`
	Number     int    `json:"number"`
	Position   string `json:"position"`
	Rating     string `json:"rating"`
	Captain    bool   `json:"captain"`
	Substitute bool   `json:"substitute"`
}

type Goals

type Goals struct {
	Home int `json:"home"`
	Away int `json:"away"`
}

type GoalsForAgainst

type GoalsForAgainst struct {
	For     int `json:"for"`
	Against int `json:"against"`
}

type GoalsForAgainstTotalAvg

type GoalsForAgainstTotalAvg struct {
	For     GoalsTotalAvg `json:"for"`
	Against GoalsTotalAvg `json:"against"`
}

type GoalsTotalAvg

type GoalsTotalAvg struct {
	Total   int    `json:"total"`
	Average string `json:"average"`
}

type Head2Head

type Head2Head struct {
	Fixture Fixture        `json:"fixture"`
	League  League         `json:"league"`
	Teams   TeamsH2H       `json:"teams"`
	Goals   Goals          `json:"goals"`
	Score   ScoreInFixture `json:"score"`
}

type Head2HeadOptions

type Head2HeadOptions struct {
	H2h      string `json:"h2h" url:"h2h"`
	Date     string `json:"date" url:"date,omitempty"`
	League   int    `json:"league" url:"league,omitempty"`
	Season   int    `json:"season" url:"season,omitempty"`
	Last     int    `json:"last" url:"last,omitempty"`
	Next     int    `json:"next" url:"next,omitempty"`
	From     string `json:"from" url:"from,omitempty"`
	To       string `json:"to" url:"to,omitempty"`
	Status   string `json:"status" url:"status,omitempty"`
	Venue    int    `json:"venue" url:"venue,omitempty"`
	Timezone string `json:"timezone" url:"timezone,omitempty"`
}

type HomeAwayAvg

type HomeAwayAvg struct {
	Home  string `json:"home"`
	Away  string `json:"away"`
	Total string `json:"total"`
}

type HomeAwayString

type HomeAwayString struct {
	Home string `json:"home"`
	Away string `json:"away"`
}

type HomeAwayTotal

type HomeAwayTotal struct {
	Home  int `json:"home"`
	Away  int `json:"away"`
	Total int `json:"total"`
}

type IntervalStats

type IntervalStats struct {
	Zero15   TotalPercentage `json:"0-15"`
	One630   TotalPercentage `json:"16-30"`
	Three145 TotalPercentage `json:"31-45"`
	Four660  TotalPercentage `json:"46-60"`
	Six175   TotalPercentage `json:"61-75"`
	Seven690 TotalPercentage `json:"76-90"`
	Nine1105 TotalPercentage `json:"91-105"`
	One06120 TotalPercentage `json:"106-120"`
}

type League

type League struct {
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Country string `json:"country"`
	Flag    string `json:"flag"`
	Season  int    `json:"season"`
	Round   string `json:"round,omitempty"`
}

type LeagueFixtures

type LeagueFixtures struct {
	Played HomeAwayTotal `json:"played"`
	Wins   HomeAwayTotal `json:"wins"`
	Draws  HomeAwayTotal `json:"draws"`
	Loses  HomeAwayTotal `json:"loses"`
}

type LeagueGoals

type LeagueGoals struct {
	For     TotalAverage `json:"for"`
	Against TotalAverage `json:"against"`
}

type LeagueInfo

type LeagueInfo struct {
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Country string `json:"country"`
	Flag    string `json:"flag"`
	Season  int    `json:"season"`
	Round   string `json:"round"`
}

type LeagueOddsLive

type LeagueOddsLive struct {
	ID     int `json:"id"`
	Season int `json:"season"`
}

type Lineups

type Lineups struct {
	Player PlayerInLineup `json:"player"`
}

type Odd

type Odd struct {
	ID     int         `json:"id"`
	Name   string      `json:"name"`
	Values []OddValues `json:"values"`
}

type OddValues

type OddValues struct {
	Value     string `json:"value"`
	Odd       string `json:"odd"`
	Handicap  string `json:"handicap"`
	Main      bool   `json:"main"`
	Suspended bool   `json:"suspended"`
}

type OddsLive

type OddsLive []struct {
	Fixture FixtureOddsLive `json:"fixture"`
	League  LeagueOddsLive  `json:"league"`
	Teams   TeamsOdds       `json:"teams"`
	Status  OddsStatus      `json:"status"`
	Update  time.Time       `json:"update"`
	Odds    []Odd           `json:"odds"`
}

type OddsLiveOptions

type OddsLiveOptions struct {
	Fixture int `json:"fixture" url:"fixture,omitempty"`
	League  int `json:"league" url:"league,omitempty"`
	Bet     int `json:"bet" url:"bet,omitempty"`
}

type OddsStatus

type OddsStatus struct {
	Stopped  bool `json:"stopped"`
	Blocked  bool `json:"blocked"`
	Finished bool `json:"finished"`
}

type PenaltyStats

type PenaltyStats struct {
	Won      int `json:"won"`
	Commited int `json:"commited"`
	Scored   int `json:"scored"`
	Missed   int `json:"missed"`
	Saved    int `json:"saved"`
}

type Percent

type Percent struct {
	Home string `json:"home"`
	Draw string `json:"draw"`
	Away string `json:"away"`
}

type Periods

type Periods struct {
	First  int `json:"first"`
	Second int `json:"second"`
}

type PersonalFixtureStats

type PersonalFixtureStats struct {
	Total    int `json:"total"`
	Conceded int `json:"conceded"`
	Assists  int `json:"assists"`
	Saves    int `json:"saves"`
}

type PersonalPassesStats

type PersonalPassesStats struct {
	Total    int    `json:"total"`
	Key      int    `json:"key"`
	Accuracy string `json:"accuracy"`
}

type PersonalTacklesStats

type PersonalTacklesStats struct {
	Total         int `json:"total"`
	Blocks        int `json:"blocks"`
	Interceptions int `json:"interceptions"`
}

type Player

type Player struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type PlayerColors

type PlayerColors struct {
	Primary string `json:"primary"`
	Number  string `json:"number"`
	Border  string `json:"border"`
}

type PlayerFixtureInfo

type PlayerFixtureInfo struct {
	Player     PlayerWithPhoto    `json:"player"`
	Statistics []PlayerStatistics `json:"statistics"`
}

type PlayerInLineup

type PlayerInLineup struct {
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Number int    `json:"number"`
	Pos    string `json:"pos"`
	Grid   string `json:"grid"`
}

type PlayerStatistics

type PlayerStatistics struct {
	Games    GameStatistic        `json:"games"`
	Offsides int                  `json:"offsides"`
	Shots    Shots                `json:"shots"`
	Goals    PersonalFixtureStats `json:"goals"`
	Passes   PersonalPassesStats  `json:"passes"`
	Tackles  PersonalTacklesStats `json:"tackles"`
	Duels    DuelsStats           `json:"duels"`
	Dribbles DribblesStats        `json:"dribbles"`
	Fouls    FoulsStats           `json:"fouls"`
	Cards    CardsStats           `json:"cards"`
	Penalty  PenaltyStats         `json:"penalty"`
}

type PlayerWithPhoto

type PlayerWithPhoto struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Photo string `json:"photo"`
}

type Prediction

type Prediction struct {
	Winner    WinnerTeam `json:"winner"`
	WinOrDraw bool       `json:"win_or_draw"`
	UnderOver string     `json:"under_over"`
	Goals     Goals      `json:"goals"`
	Advice    string     `json:"advice"`
	Percent   Percent    `json:"percent"`
}

type Predictions

type Predictions []struct {
	Predictions Prediction       `json:"predictions"`
	League      League           `json:"league"`
	Teams       PredictionsTeams `json:"teams"`
	Comparison  Comparison       `json:"comparison"`
	H2H         []Head2Head      `json:"h2h"`
}

type PredictionsLeague

type PredictionsLeague struct {
	Form          string         `json:"form"`
	Fixtures      LeagueFixtures `json:"fixtures"`
	Goals         LeagueGoals    `json:"goals"`
	Biggest       Biggest        `json:"biggest"`
	CleanSheet    HomeAwayTotal  `json:"clean_sheet"`
	FailedToScore HomeAwayTotal  `json:"failed_to_score"`
}

type PredictionsOptions

type PredictionsOptions struct {
	Fixture int `json:"fixture" url:"fixture"`
}

type PredictionsTeam

type PredictionsTeam struct {
	ID     int                    `json:"id"`
	Name   string                 `json:"name"`
	Last5  TeamPredictionsPerTime `json:"last_5"`
	League PredictionsLeague      `json:"league"`
}

type PredictionsTeams

type PredictionsTeams struct {
	Home PredictionsTeam `json:"home"`
	Away PredictionsTeam `json:"away"`
}

type ScoreInFixture

type ScoreInFixture struct {
	Halftime  Goals `json:"halftime"`
	Fulltime  Goals `json:"fulltime"`
	Extratime Goals `json:"extratime"`
	Penalty   Goals `json:"penalty"`
}

type Shots

type Shots struct {
	Total int `json:"total"`
	On    int `json:"on"`
}

type Sidelined

type Sidelined []struct {
	Type  string `json:"type"`
	Start string `json:"start"`
	End   string `json:"end"`
}

type SidelinedOptions

type SidelinedOptions struct {
	Player int `json:"player" url:"player,omitempty"`
	Coach  int `json:"coach" url:"coach,omitempty"`
}

type StandingTeamStats

type StandingTeamStats struct {
	Played int             `json:"played"`
	Win    int             `json:"win"`
	Draw   int             `json:"draw"`
	Lose   int             `json:"lose"`
	Goals  GoalsForAgainst `json:"goals"`
}

type Standings

type Standings []struct {
	League StandingsLeague `json:"league"`
}

type StandingsLeague

type StandingsLeague struct {
	ID        int                  `json:"id"`
	Name      string               `json:"name"`
	Country   string               `json:"country"`
	Flag      string               `json:"flag"`
	Season    int                  `json:"season"`
	Standings [][]StandingsPerTeam `json:"standings"`
}

type StandingsOptions

type StandingsOptions struct {
	League int `json:"league" url:"league,omitempty"`
	Season int `json:"season" url:"season"`
	Team   int `json:"team" url:"team,omitempty"`
}

type StandingsPerTeam

type StandingsPerTeam struct {
	Rank        int               `json:"rank"`
	Team        TeamShortInfo     `json:"team"`
	Points      int               `json:"points"`
	GoalsDiff   int               `json:"goalsDiff"`
	Group       string            `json:"group"`
	Form        string            `json:"form"`
	Status      string            `json:"status"`
	Description string            `json:"description"`
	All         AllStandings      `json:"all"`
	Home        StandingTeamStats `json:"home"`
	Away        StandingTeamStats `json:"away"`
	Update      time.Time         `json:"update"`
}

type StatisticsGoalsByTeam

type StatisticsGoalsByTeam struct {
	Total   HomeAwayTotal `json:"total"`
	Average HomeAwayAvg   `json:"average"`
	Minute  IntervalStats `json:"minute"`
}

type Status

type Status struct {
	Long    string `json:"long"`
	Short   string `json:"short"`
	Elapsed int    `json:"elapsed"`
}

type StatusResponse

type StatusResponse struct {
	Get        string        `json:"get"`
	Parameters []interface{} `json:"parameters"`
	Errors     []interface{} `json:"errors"`
	Results    int           `json:"results"`
	Paging     struct {
		Current int `json:"current"`
		Total   int `json:"total"`
	} `json:"paging"`
	Response struct {
		Account struct {
			Firstname string `json:"firstname"`
			Lastname  string `json:"lastname"`
			Email     string `json:"email"`
		} `json:"account"`
		Subscription struct {
			Plan   string    `json:"plan"`
			End    time.Time `json:"end"`
			Active bool      `json:"active"`
		} `json:"subscription"`
		Requests struct {
			Current  int `json:"current"`
			LimitDay int `json:"limit_day"`
		} `json:"requests"`
	} `json:"response"`
}

type TeamExtendedInfo

type TeamExtendedInfo struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Code     string `json:"code"`
	Country  string `json:"country"`
	Founded  int    `json:"founded"`
	National bool   `json:"national"`
}

type TeamFixtureFullInfo

type TeamFixtureFullInfo struct {
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Colors `json:"colors"`
}

type TeamFixtureInfo

type TeamFixtureInfo struct {
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Winner bool   `json:"winner"`
}

type TeamGoalsOddsLive

type TeamGoalsOddsLive struct {
	ID    int `json:"id"`
	Goals int `json:"goals"`
}

type TeamGoalsStatistics

type TeamGoalsStatistics struct {
	For     StatisticsGoalsByTeam `json:"for"`
	Against StatisticsGoalsByTeam `json:"against"`
}

type TeamPredictionsPerTime

type TeamPredictionsPerTime struct {
	Form  string                  `json:"form"`
	Att   string                  `json:"att"`
	Def   string                  `json:"def"`
	Goals GoalsForAgainstTotalAvg `json:"goals"`
}

type TeamSeasonsOptions

type TeamSeasonsOptions struct {
	Team int `json:"team" url:"team,omitempty"`
}

type TeamShortInfo

type TeamShortInfo struct {
	ID     int       `json:"id"`
	Name   string    `json:"name"`
	Update time.Time `json:"update,omitempty"`
	Winner bool      `json:"winner,omitempty"`
}

type TeamStatistics

type TeamStatistics struct {
	League        League                `json:"league"`
	Team          TeamShortInfo         `json:"team"`
	Form          string                `json:"form"`
	Fixtures      LeagueFixtures        `json:"fixtures"`
	Goals         TeamGoalsStatistics   `json:"goals"`
	Biggest       Biggest               `json:"biggest"`
	CleanSheet    HomeAwayTotal         `json:"clean_sheet"`
	FailedToScore HomeAwayTotal         `json:"failed_to_score"`
	Penalty       TeamStatisticsPenalty `json:"penalty"`
	Lineups       []FormationPlayed     `json:"lineups"`
	Cards         Cards                 `json:"cards"`
}

type TeamStatisticsOption

type TeamStatisticsOption struct {
	Team   int    `json:"team" url:"team"`
	Season int    `json:"season" url:"season"`
	League int    `json:"league" url:"league"`
	Date   string `json:"date" url:"date,omitempty"`
}

type TeamStatisticsPenalty

type TeamStatisticsPenalty struct {
	Scored TotalPercentage `json:"scored"`
	Missed TotalPercentage `json:"missed"`
	Total  int             `json:"total"`
}

type Teams

type Teams []struct {
	Team  TeamExtendedInfo  `json:"team"`
	Venue VenueExtendedInfo `json:"venue"`
}

type TeamsFixture

type TeamsFixture struct {
	Home TeamFixtureInfo `json:"home"`
	Away TeamFixtureInfo `json:"away"`
}

type TeamsH2H

type TeamsH2H struct {
	Home TeamShortInfo `json:"home"`
	Away TeamShortInfo `json:"away"`
}

type TeamsOdds

type TeamsOdds struct {
	Home TeamGoalsOddsLive `json:"home"`
	Away TeamGoalsOddsLive `json:"away"`
}

type TeamsOptions

type TeamsOptions struct {
	Id      int    `json:"id" url:"id,omitempty"`
	Name    string `json:"name" url:"name,omitempty"`
	League  int    `json:"league" url:"league,omitempty"`
	Season  int    `json:"season" url:"season,omitempty"`
	Country string `json:"country" url:"country,omitempty"`
	Code    string `json:"code" url:"code,omitempty"`
	Venue   int    `json:"venue" url:"venue,omitempty"`
	Search  string `json:"search" url:"search,omitempty"`
}

type TotalAverage

type TotalAverage struct {
	Total   HomeAwayTotal `json:"total"`
	Average HomeAwayAvg   `json:"average"`
}

type TotalPercentage

type TotalPercentage struct {
	Total      int    `json:"total"`
	Percentage string `json:"percentage"`
}

type Transfer

type Transfer struct {
	Date  string             `json:"date"`
	Type  string             `json:"type"`
	Teams TransferTeamsInOut `json:"teams"`
}

type TransferTeamsInOut

type TransferTeamsInOut struct {
	In  TeamShortInfo `json:"in"`
	Out TeamShortInfo `json:"out"`
}

type Transfers

type Transfers []struct {
	Player    Player     `json:"player"`
	Update    time.Time  `json:"update"`
	Transfers []Transfer `json:"transfers"`
}

type TransfersOptions

type TransfersOptions struct {
	Player int `json:"player" url:"player,omitempty"`
	Team   int `json:"team" url:"team,omitempty"`
}

type TypeValueStatistic

type TypeValueStatistic struct {
	Type  string `json:"type"`
	Value any    `json:"value"`
}

type VenueExtendedInfo

type VenueExtendedInfo struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Address  string `json:"address"`
	City     string `json:"city"`
	Capacity int    `json:"capacity"`
	Surface  string `json:"surface"`
	Image    string `json:"image"`
}

type VenueShortInfo

type VenueShortInfo struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	City string `json:"city"`
}

type Venues

type Venues []struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Address  string `json:"address"`
	City     string `json:"city"`
	Country  string `json:"country"`
	Capacity int    `json:"capacity"`
	Surface  string `json:"surface"`
	Image    string `json:"image"`
}

type VenuesOptions

type VenuesOptions struct {
	Id      int    `json:"id" url:"id,omitempty"`
	Name    string `json:"name" url:"name,omitempty"`
	City    string `json:"city" url:"city,omitempty"`
	Country string `json:"country" url:"country,omitempty"`
	Search  string `json:"search" url:"search,omitempty"`
}

type WinnerTeam

type WinnerTeam struct {
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Comment string `json:"comment"`
}

type WinsDrawsLoses

type WinsDrawsLoses struct {
	Wins  int `json:"wins"`
	Draws int `json:"draws"`
	Loses int `json:"loses"`
}

Jump to

Keyboard shortcuts

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