Documentation ¶
Index ¶
- type AdditionalPlayerMatchStats
- type AggregatedAssistScorerData
- type AggregatedCardScorerData
- type AggregatedGoalScorerData
- type AggregatedMatchOddsData
- type AggregatedTopScorers
- type AssistScorer
- type AssistScorerData
- type Assistants
- type Bookmaker
- type BookmakerOdds
- type BookmakerOddsData
- type CardEvent
- type CardEventsData
- type CardScorer
- type CardScorerData
- type Cards
- type Coach
- type CoachData
- type Coaches
- type Commentary
- type Continent
- type ContinentData
- type CornerEvent
- type CornerEventsData
- type CountriesData
- type Country
- type CountryData
- type CountryExtra
- type Crosses
- type DateTime
- type Dribbles
- type Duels
- type ErrBadStatusCode
- type Fixture
- func (f *Fixture) Bench() []PlayerStats
- func (f *Fixture) Cards() []CardEvent
- func (f *Fixture) Commentary() []Commentary
- func (f *Fixture) Corners() []CornerEvent
- func (f *Fixture) Events() []MatchEvent
- func (f *Fixture) FirstAssistant() *MatchOfficial
- func (f *Fixture) FlatOdds() []MatchOdds
- func (f *Fixture) FourthOfficial() *MatchOfficial
- func (f *Fixture) Goals() []GoalEvent
- func (f *Fixture) Highlights() []VideoHighlights
- func (f *Fixture) InPlayOdds() []MatchOdds
- func (f *Fixture) League() *League
- func (f *Fixture) Lineups() []PlayerStats
- func (f *Fixture) LocalCoach() *Coach
- func (f *Fixture) LocalTeam() *Team
- func (f *Fixture) Odds() []MatchOdds
- func (f *Fixture) Referee() *MatchOfficial
- func (f *Fixture) Round() *Round
- func (f *Fixture) SecondAssistant() *MatchOfficial
- func (f *Fixture) Sidelined() []Sidelined
- func (f *Fixture) Stage() *Stage
- func (f *Fixture) Substitutions() []SubstitutionEvent
- func (f *Fixture) TVStations() []TVStation
- func (f *Fixture) TeamStats() []TeamStats
- func (f *Fixture) Venue() *Venue
- func (f *Fixture) VisitorCoach() *Coach
- func (f *Fixture) VisitorTeam() *Team
- type FixtureData
- type FixtureTime
- type FixturesData
- type FlexFloat
- type FlexInt
- type Formations
- type Fouls
- type GoalEvent
- type GoalEventsData
- type GoalScorer
- type GoalScorerData
- type Goals
- type Group
- type GroupsData
- type HTTPClient
- func (c *HTTPClient) AggregatedTopScorersBySeasonID(ctx context.Context, seasonID int, includes []string) (*AggregatedTopScorers, *Meta, error)
- func (c *HTTPClient) BookmakerByID(ctx context.Context, id int) (*Bookmaker, *Meta, error)
- func (c *HTTPClient) Bookmakers(ctx context.Context) ([]Bookmaker, *Meta, error)
- func (c *HTTPClient) CoachByID(ctx context.Context, id int) (*Coach, *Meta, error)
- func (c *HTTPClient) CommentariesByFixtureID(ctx context.Context, fixtureID int) ([]Commentary, *Meta, error)
- func (c *HTTPClient) ContinentByID(ctx context.Context, id int, includes []string) (*Continent, *Meta, error)
- func (c *HTTPClient) Continents(ctx context.Context, page int, includes []string) ([]Continent, *Meta, error)
- func (c *HTTPClient) Countries(ctx context.Context, page int, includes []string) ([]Country, *Meta, error)
- func (c *HTTPClient) CountryByID(ctx context.Context, id int, includes []string) (*Country, *Meta, error)
- func (c *HTTPClient) FixtureByID(ctx context.Context, id int, includes []string, filters map[string][]int) (*Fixture, *Meta, error)
- func (c *HTTPClient) FixturesBetween(ctx context.Context, from, to time.Time, includes []string, ...) ([]Fixture, *Meta, error)
- func (c *HTTPClient) FixturesBetweenForTeam(ctx context.Context, from, to time.Time, teamID int, includes []string, ...) ([]Fixture, *Meta, error)
- func (c *HTTPClient) FixturesByDate(ctx context.Context, date time.Time, includes []string, ...) ([]Fixture, *Meta, error)
- func (c *HTTPClient) FixturesByID(ctx context.Context, ids []int, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
- func (c *HTTPClient) FixturesLastUpdated(ctx context.Context, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
- func (c *HTTPClient) HeadToHead(ctx context.Context, idOne, idTwo int, includes []string) ([]Fixture, *Meta, error)
- func (c *HTTPClient) InPlayOddsByFixtureID(ctx context.Context, fixtureID int) ([]MatchOdds, *Meta, error)
- func (c *HTTPClient) LeagueByID(ctx context.Context, id int, includes []string) (*League, *Meta, error)
- func (c *HTTPClient) Leagues(ctx context.Context, page int, includes []string) ([]League, *Meta, error)
- func (c *HTTPClient) LiveScores(ctx context.Context, page int, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
- func (c *HTTPClient) LiveScoresInPlay(ctx context.Context, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
- func (c *HTTPClient) LiveStandingsBySeasonID(ctx context.Context, seasonID int, filters map[string][]int) ([]LiveStandings, *Meta, error)
- func (c *HTTPClient) MarketByID(ctx context.Context, id int) (*Market, *Meta, error)
- func (c *HTTPClient) Markets(ctx context.Context) ([]Market, *Meta, error)
- func (c *HTTPClient) OddsByFixtureAndBookmaker(ctx context.Context, fixtureID, bookmakerID int) ([]MatchOdds, *Meta, error)
- func (c *HTTPClient) OddsByFixtureAndMarket(ctx context.Context, fixtureID, marketID int) ([]MatchOdds, *Meta, error)
- func (c *HTTPClient) OddsByFixtureID(ctx context.Context, fixtureID int) ([]MatchOdds, *Meta, error)
- func (c *HTTPClient) PlayerByID(ctx context.Context, id int, includes []string) (*Player, *Meta, error)
- func (c *HTTPClient) RoundByID(ctx context.Context, id int, includes []string) (*Round, *Meta, error)
- func (c *HTTPClient) RoundsBySeasonID(ctx context.Context, id int, includes []string) ([]Round, *Meta, error)
- func (c *HTTPClient) SeasonByID(ctx context.Context, id int, includes []string) (*Season, *Meta, error)
- func (c *HTTPClient) Seasons(ctx context.Context, page int, includes []string) ([]Season, *Meta, error)
- func (c *HTTPClient) SetBaseURL(url string)
- func (c *HTTPClient) SetHTTPClient(h *http.Client)
- func (c *HTTPClient) StageByID(ctx context.Context, id int, includes []string) (*Stage, *Meta, error)
- func (c *HTTPClient) StagesBySeasonID(ctx context.Context, id int, includes []string) ([]Stage, *Meta, error)
- func (c *HTTPClient) StandingsBySeasonID(ctx context.Context, seasonID int, includes []string, filters map[string][]int) ([]Standings, *Meta, error)
- func (c *HTTPClient) TVStationsByFixtureID(ctx context.Context, fixtureID int) ([]TVStation, *Meta, error)
- func (c *HTTPClient) TeamByID(ctx context.Context, id int, includes []string, filters map[string][]int) (*Team, *Meta, error)
- func (c *HTTPClient) TeamSquad(ctx context.Context, seasonID, teamID int, includes []string) ([]SquadPlayer, *Meta, error)
- func (c *HTTPClient) TeamsBySeasonID(ctx context.Context, seasonID, page int, includes []string) ([]Team, *Meta, error)
- func (c *HTTPClient) TopScorersBySeasonID(ctx context.Context, seasonID int, includes []string, filters map[string][]int) (*TopScorers, *Meta, error)
- func (c *HTTPClient) VenueByID(ctx context.Context, id int) (*Venue, *Meta, error)
- func (c *HTTPClient) VenuesBySeasonID(ctx context.Context, id int) ([]Venue, *Meta, error)
- func (c *HTTPClient) VideoHighlights(ctx context.Context, page int, includes []string) ([]VideoHighlights, *Meta, error)
- type KitColors
- type League
- type LeagueCoverage
- type LeagueData
- type LeagueStanding
- type LeagueStandingData
- type LeaguesData
- type LiveStandings
- type Market
- type MatchCommentaryData
- type MatchEvent
- type MatchEventsData
- type MatchHighlightsData
- type MatchOdds
- type MatchOfficial
- type MatchOfficialData
- type MatchPasses
- type MatchTVStationsData
- type Meta
- type Odds
- type OddsData
- type Pagination
- type Passes
- type Penalties
- type Plan
- type Player
- func (p *Player) Country() *Country
- func (p *Player) Lineup() []PlayerStats
- func (p *Player) Position() *Position
- func (p *Player) Sidelined() []Sidelined
- func (p *Player) Stats() []PlayerSeasonStats
- func (p *Player) Team() *Team
- func (p *Player) Transfers() []Transfer
- func (p *Player) Trophies() []Trophy
- type PlayerData
- type PlayerLineupData
- type PlayerMatchStats
- type PlayerSeasonStats
- type PlayerSeasonStatsData
- type PlayerStats
- type Position
- type PositionData
- type Ranking
- type RankingData
- type Round
- type RoundData
- type RoundsData
- type Scores
- type Season
- func (s *Season) AggregatedAssistScorers() []AssistScorer
- func (s *Season) AggregatedCardScorers() []CardScorer
- func (s *Season) AggregatedGoalScorers() []GoalScorer
- func (s *Season) AssistScorers() []AssistScorer
- func (s *Season) CardScorers() []CardScorer
- func (s *Season) Fixtures() []Fixture
- func (s *Season) GoalScorers() []GoalScorer
- func (s *Season) Groups() []Group
- func (s *Season) League() *League
- func (s *Season) Results() []Fixture
- func (s *Season) Rounds() []Round
- func (s *Season) Stages() []Stage
- func (s *Season) UpcomingFixtures() []Fixture
- type SeasonData
- type SeasonsData
- type Shots
- type Sidelined
- type SidelinedData
- type Sport
- type Sports
- type SquadPlayer
- type SquadPlayerData
- type Stage
- type StageData
- type StagesData
- type Standings
- type SubstitutionEvent
- type SubstitutionEventsData
- type TVStation
- type Team
- func (t *Team) AggregatedAssistScorers() []AssistScorer
- func (t *Team) AggregatedCardScorers() []CardScorer
- func (t *Team) AggregatedGoalScorers() []CardScorer
- func (t *Team) AssistScorers() []AssistScorer
- func (t *Team) CardScorers() []CardScorer
- func (t *Team) Coach() *Coach
- func (t *Team) Country() *Country
- func (t *Team) FIFARanking() *Ranking
- func (t *Team) GoalScorers() []GoalScorer
- func (t *Team) LatestResults() []Fixture
- func (t *Team) League() *League
- func (t *Team) LocalFixtures() []Fixture
- func (t *Team) Sidelined() []Sidelined
- func (t *Team) Squad() []SquadPlayer
- func (t *Team) Stats() *TeamSeasonStats
- func (t *Team) Transfers() []Transfer
- func (t *Team) UEFARanking() *Ranking
- func (t *Team) UpcomingFixtures() []Fixture
- func (t *Team) Venue() *Venue
- func (t *Team) VisitorFixtures() []Fixture
- func (t *Team) VisitorResults() []Fixture
- type TeamAttacks
- type TeamColors
- type TeamData
- type TeamLeagueStats
- type TeamLeagueTotalStats
- type TeamPasses
- type TeamSeasonStats
- type TeamSeasonStatsData
- type TeamShots
- type TeamStandings
- type TeamStats
- type TeamsStatsData
- type TopScorers
- type Transfer
- type TransfersData
- type Trophy
- type TrophyData
- type Venue
- type VenueData
- type VideoHighlights
- type WeatherReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalPlayerMatchStats ¶
type AdditionalPlayerMatchStats struct { Offsides *int `json:"offsides"` Saves *int `json:"saves"` InsideBoxSaves *int `json:"inside_box_saves"` PenScored *int `json:"pen_scored"` PenMissed *int `json:"pen_missed"` PenSaved *int `json:"pen_saved"` PenCommitted *int `json:"pen_committed"` PenWon *int `json:"pen_won"` HitWoodwork *int `json:"hit_woodwork"` Tackles *int `json:"tackles"` Blocks *int `json:"blocks"` Interceptions *int `json:"interceptions"` Clearances *int `json:"clearances"` Dispossessed *int `json:"dispossesed"` MinutesPlayed *int `json:"minutes_played"` }
AdditionalPlayerMatchStats provides additional stats information.
type AggregatedAssistScorerData ¶ added in v0.1.6
type AggregatedAssistScorerData struct {
Data []AssistScorer `json:"data"`
}
type AggregatedCardScorerData ¶ added in v0.1.6
type AggregatedCardScorerData struct {
Data []CardScorer `json:"data"`
}
type AggregatedGoalScorerData ¶ added in v0.1.6
type AggregatedGoalScorerData struct {
Data []GoalScorer `json:"data"`
}
type AggregatedMatchOddsData ¶ added in v0.1.6
type AggregatedMatchOddsData struct {
Data []MatchOdds `json:"data"`
}
type AggregatedTopScorers ¶
type AggregatedTopScorers struct { ID int `json:"id"` Name string `json:"name"` LeagueID int `json:"league_id"` IsCurrentSeason bool `json:"is_current_season"` CurrentRoundID *int `json:"current_round_id"` CurrentStageID *int `json:"current_stage_id"` AssistScorerData AssistScorerData `json:"aggregatedAssistscorers"` CardScorerData CardScorerData `json:"aggregatedCardscorers"` GoalScorerData GoalScorerData `json:"aggregatedGoalscorers"` }
AggregatedTopScorers provides a struct representation of a AggregatedTopScorers resource.
func (*AggregatedTopScorers) AssistScorers ¶
func (a *AggregatedTopScorers) AssistScorers() []AssistScorer
AssistScorers returns aggregated assist scorer data.
func (*AggregatedTopScorers) CardScorers ¶
func (a *AggregatedTopScorers) CardScorers() []CardScorer
CardScorers returns aggregated card scorer data.
func (*AggregatedTopScorers) GoalScorers ¶
func (a *AggregatedTopScorers) GoalScorers() []GoalScorer
GoalScorers returns aggregated goal scorer data.
type AssistScorer ¶
type AssistScorer struct { Position int `json:"position"` SeasonID int `json:"season_id"` PlayerID int `json:"player_id"` TeamID int `json:"team_id"` StageID int `json:"stage_id"` Assists int `json:"assists"` Type string `json:"type"` PlayerData PlayerData `json:"player"` TeamData TeamData `json:"team"` }
AssistScorer provides a struct representation of a AssistScorer resource
func (*AssistScorer) Player ¶
func (a *AssistScorer) Player() *Player
Player returns the player data associated to an assist scorer record.
func (*AssistScorer) Team ¶
func (a *AssistScorer) Team() *Team
Team returns the team data associated to an assist scorer record.
type AssistScorerData ¶ added in v0.1.6
type AssistScorerData struct {
Data []AssistScorer `json:"data"`
}
type Assistants ¶
type Assistants struct { FirstAssistantID *int `json:"first_assistant_id"` SecondAssistantID *int `json:"second_assistant_id"` FourthOfficialID *int `json:"fourth_official_id"` }
Assistants provides IDs of match officials.
type BookmakerOdds ¶
type BookmakerOdds struct { ID int `json:"id"` Name string `json:"name"` OddsData OddsData `json:"odds"` }
BookmakerOdds provides a struct representation of a BookmakerOdds resource.
func (*BookmakerOdds) Odds ¶
func (b *BookmakerOdds) Odds() []Odds
Odds returns odds data for a specific bookmaker.
type BookmakerOddsData ¶ added in v0.1.6
type BookmakerOddsData struct {
Data []BookmakerOdds `json:"data"`
}
type CardEvent ¶
type CardEvent struct { ID int64 `json:"id"` TeamID string `json:"team_id"` Type string `json:"type"` FixtureID int `json:"fixture_id"` PlayerID int `json:"player_id"` PlayerName string `json:"player_name"` Minute int `json:"minute"` ExtraMinute *int `json:"extra_minute"` Reason *string `json:"reason"` }
CardEvent provides details of a card event.
type CardEventsData ¶ added in v0.1.6
type CardEventsData struct {
Data []CardEvent `json:"data"`
}
type CardScorer ¶
type CardScorer struct { Position int `json:"position"` SeasonID int `json:"season_id"` PlayerID int `json:"player_id"` TeamID int `json:"team_id"` StageID int `json:"stage_id"` YellowCards int `json:"yellowcards"` RedCards int `json:"redcards"` Type string `json:"type"` PlayerData PlayerData `json:"player"` TeamData TeamData `json:"team"` }
CardScorer provides a struct representation of a CardScorer resource.
func (*CardScorer) Player ¶
func (c *CardScorer) Player() *Player
Player returns the player data associated to an card scorer record.
func (*CardScorer) Team ¶
func (c *CardScorer) Team() *Team
Team returns the team data associated to an card scorer record.
type CardScorerData ¶ added in v0.1.6
type CardScorerData struct {
Data []CardScorer `json:"data"`
}
type Coach ¶
type Coach struct { ID int `json:"coach_id"` TeamID int `json:"team_id"` CountryID int `json:"country_id"` CommonName string `json:"common_name"` FullName string `json:"fullname"` FirstName string `json:"firstname"` LastName string `json:"lastname"` Nationality string `json:"nationality"` BirthDate string `json:"birthdate"` BirthCountry string `json:"birthcountry"` BirthPlace *string `json:"birthplace"` ImagePath string `json:"image_path"` }
Coach provides a struct representation of a Coach resource
type Coaches ¶
type Coaches struct { LocalTeamCoachID int `json:"localteam_coach_id"` VisitorTeamCoachID int `json:"visitorteam_coach_id"` }
Coaches provides IDs of coaches in a fixture.
type Commentary ¶
type Commentary struct { FixtureID int `json:"fixture_id"` Important bool `json:"important"` Order int `json:"order"` Goal bool `json:"goal"` Minute int `json:"minute"` ExtraMinute *int `json:"extra_minute"` Comment string `json:"comment"` }
Commentary provides a struct representation of a Commentary resource.
type Continent ¶
type Continent struct { ID int `json:"id"` Name string `json:"name"` CountriesData CountriesData `json:"countries,omitempty"` }
Continent provides a struct representation of a Continent resource.
type ContinentData ¶ added in v0.1.6
type ContinentData struct {
Data *Continent `json:"data"`
}
type CornerEvent ¶
type CornerEvent struct { ID int `json:"id"` TeamID int `json:"team_id"` FixtureID int `json:"fixture_id"` Minute int `json:"minute"` ExtraMinute *int `json:"extra_minute"` Comment string `json:"comment"` }
CornerEvent provides details of a corner event.
type CornerEventsData ¶ added in v0.1.6
type CornerEventsData struct {
Data []CornerEvent `json:"data"`
}
type CountriesData ¶ added in v0.1.6
type CountriesData struct {
Data []Country `json:"data"`
}
type Country ¶
type Country struct { ID int `json:"id"` Name string `json:"name"` Extra CountryExtra `json:"extra"` ContinentData ContinentData `json:"continent,omitempty"` LeaguesData LeaguesData `json:"leagues,omitempty"` }
Country provides a struct representation of a Country resource.
type CountryData ¶ added in v0.1.6
type CountryData struct {
Data *Country `json:"data"`
}
type CountryExtra ¶
type CountryExtra struct { Continent string `json:"continent"` SubRegion string `json:"sub_region"` WorldRegion string `json:"world_region"` FIFA interface{} `json:"fifa,string"` ISO string `json:"iso"` ISO2 string `json:"iso2"` Longitude string `json:"longitude"` Latitude string `json:"latitude"` Flag string `json:"flag"` }
CountryExtra provides additional data for a Country.
type DateTime ¶
type DateTime struct { Date string `json:"date"` TimezoneType int `json:"timezone_type"` Timezone string `json:"timezone"` }
DateTime struct.
type Dribbles ¶
type Dribbles struct { Attempts *int `json:"attempts"` Success *int `json:"success"` DribbledPast *int `json:"dribbled_past"` }
Dribbles explains dribble stat data for a player.
type ErrBadStatusCode ¶
type ErrBadStatusCode struct { Err *struct { Message string `json:"message"` Code int `json:"code"` } `json:"error"` }
ErrBadStatusCode is returned when the API returns a non 200 error code.
func (*ErrBadStatusCode) Error ¶
func (e *ErrBadStatusCode) Error() string
type Fixture ¶
type Fixture struct { ID int `json:"id"` LeagueID int `json:"league_id"` SeasonID int `json:"season_id"` StageID *int `json:"stage_id"` RoundID *int `json:"round_id"` GroupID *int `json:"group_id"` AggregateID *int `json:"aggregate_id"` VenueID *int `json:"venue_id"` RefereeID *int `json:"referee_id"` LocalTeamID int `json:"localteam_id"` VisitorTeamID int `json:"visitorteam_id"` WinnerTeamID *int `json:"winner_team_id"` WeatherReport *WeatherReport `json:"weather_report,omitempty"` Commentaries *bool `json:"commentaries"` Attendance *int `json:"attendance"` Pitch *string `json:"pitch"` Details *string `json:"details"` NeutralVenue *bool `json:"neutral_venue"` WinningOddsCalculated bool `json:"winning_odds_calculated"` Formations Formations `json:"formations"` Scores Scores `json:"scores"` Time FixtureTime `json:"time"` Coaches Coaches `json:"coaches"` Standings TeamStandings `json:"standings"` Assistants Assistants `json:"assistants"` Leg *string `json:"leg"` Colors *TeamColors `json:"colors,omitempty"` Deleted bool `json:"deleted"` CardEvents CardEventsData `json:"cards"` CornerEvents CornerEventsData `json:"corners"` GoalEvents GoalEventsData `json:"goals"` MatchEvents MatchEventsData `json:"events"` LineupData PlayerLineupData `json:"lineup"` BenchData PlayerLineupData `json:"bench"` LocalTeamData TeamData `json:"localTeam,omitempty"` VisitorTeamData TeamData `json:"visitorTeam,omitempty"` SubstitutionData SubstitutionEventsData `json:"substitutions"` SidelinedData SidelinedData `json:"sidelined"` CommentsData MatchCommentaryData `json:"comments,omitempty"` TVStationData MatchTVStationsData `json:"tvstations"` HighlightData MatchHighlightsData `json:"highlights,omitempty"` LeagueData LeagueData `json:"league,omitempty"` RoundData RoundData `json:"round,omitempty"` StageData StageData `json:"stage,omitempty"` RefereeData MatchOfficialData `json:"referee,omitempty"` FirstAssistantData MatchOfficialData `json:"firstAssistant,omitempty"` SecondAssistantData MatchOfficialData `json:"secondAssistant,omitempty"` FourthOfficialData MatchOfficialData `json:"fourthOfficial,omitempty"` VenueData VenueData `json:"venue,omitempty"` OddsData AggregatedMatchOddsData `json:"odds,omitempty"` InPlayOddsData AggregatedMatchOddsData `json:"inplayOdds,omitempty"` FlatOddsData AggregatedMatchOddsData `json:"flatOdds,omitempty"` LocalCoachData CoachData `json:"localCoach,omitempty"` VisitorCoachData CoachData `json:"visitorCoach,omitempty"` TeamStatsData TeamsStatsData `json:"stats,omitempty"` }
Fixture provides a struct representation of a Fixture resource.
func (*Fixture) Bench ¶
func (f *Fixture) Bench() []PlayerStats
Bench returns PlayerStats data for players on the bench for a fixture.
func (*Fixture) Commentary ¶
func (f *Fixture) Commentary() []Commentary
Commentary returns Commentary data for a fixture.
func (*Fixture) Corners ¶
func (f *Fixture) Corners() []CornerEvent
Corners returns CornerEvents for a fixture.
func (*Fixture) Events ¶
func (f *Fixture) Events() []MatchEvent
Events returns all events for a fixture.
func (*Fixture) FirstAssistant ¶
func (f *Fixture) FirstAssistant() *MatchOfficial
FirstAssistant return first assistant data for a fixture.
func (*Fixture) FourthOfficial ¶
func (f *Fixture) FourthOfficial() *MatchOfficial
FourthOfficial return fourth official data for a fixture.
func (*Fixture) Highlights ¶
func (f *Fixture) Highlights() []VideoHighlights
Highlights returns video highlights data for a fixture.
func (*Fixture) InPlayOdds ¶
InPlayOdds returns in play odds data for a fixture.
func (*Fixture) Lineups ¶
func (f *Fixture) Lineups() []PlayerStats
Lineups returns PlayerStats data for starting players for a fixture.
func (*Fixture) LocalCoach ¶
LocalCoach returns coach data for the home team.
func (*Fixture) Referee ¶
func (f *Fixture) Referee() *MatchOfficial
Referee returns referee data for a fixture.
func (*Fixture) SecondAssistant ¶
func (f *Fixture) SecondAssistant() *MatchOfficial
SecondAssistant return second assistant data for a fixture.
func (*Fixture) Substitutions ¶
func (f *Fixture) Substitutions() []SubstitutionEvent
Substitutions returns SubstitutionEvents for a fixture.
func (*Fixture) TVStations ¶
TVStations return tv station data for a fixture.
func (*Fixture) VisitorCoach ¶
VisitorCoach returns coach data for the away team.
func (*Fixture) VisitorTeam ¶
VisitorTeam return teams data for the away team.
type FixtureData ¶ added in v0.1.6
type FixtureData struct {
Data *Fixture `json:"data"`
}
type FixtureTime ¶
type FixtureTime struct { Status string `json:"status"` StartingAt struct { DateTime string `json:"date_time"` Date string `json:"date"` Time string `json:"time"` Timestamp int `json:"timestamp"` Timezone string `json:"timezone"` } `json:"starting_at"` Minute int `json:"minute"` AddedTime *int `json:"added_time"` ExtraMinute *int `json:"extra_minute"` InjuryTime *int `json:"injury_time"` }
FixtureTime in depth time data for a fixture.
type FixturesData ¶ added in v0.1.6
type FixturesData struct {
Data []Fixture `json:"data"`
}
type FlexFloat ¶ added in v0.1.7
type FlexFloat float32
A FlexFloat is a float that can be un marshalled from a JSON field that has either a number or a string value. E.g. if the json field contains a string "4.2", the FlexFloat value will be 4.2.
func (*FlexFloat) UnmarshalJSON ¶ added in v0.1.7
UnmarshalJSON implements the json.Unmarshaler interface, which allows values of any json type as an int and run our custom conversion
type FlexInt ¶
type FlexInt int
A FlexInt is an int that can be un marshalled from a JSON field that has either a number or a string value. E.g. if the json field contains a string "42", the FlexInt value will be 42.
func (*FlexInt) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface, which allows values of any json type as an int and run our custom conversion
type Formations ¶
type Formations struct { LocalTeamFormation *string `json:"localteam_formation,omitempty"` VisitorTeamFormation *string `json:"visitorteam_formation,omitempty"` }
Formations provides formation information for home and away teams for a fixture.
type GoalEvent ¶
type GoalEvent struct { ID int `json:"id"` TeamID string `json:"team_id"` Type string `json:"type"` FixtureID int `json:"fixture_id"` PlayerID int `json:"player_id"` PlayerName string `json:"player_name"` PlayerAssistID *int `json:"player_assist_id"` PlayerAssistName *string `json:"player_assist_name"` Minute int `json:"minute"` ExtraMinute *int `json:"extra_minute"` Reason *string `json:"reason"` Result string `json:"result"` }
GoalEvent provides in depth data for a goal event.
type GoalEventsData ¶ added in v0.1.6
type GoalEventsData struct {
Data []GoalEvent `json:"data"`
}
type GoalScorer ¶
type GoalScorer struct { Position int `json:"position"` SeasonID int `json:"season_id"` PlayerID int `json:"player_id"` TeamID int `json:"team_id"` StageID int `json:"stage_id"` Goals int `json:"goals"` PenaltyGoals int `json:"penalty_goals"` Type string `json:"type"` PlayerData PlayerData `json:"player"` TeamData TeamData `json:"team"` }
GoalScorer provides a struct representation of a GoalScorer resource.
func (*GoalScorer) Player ¶
func (g *GoalScorer) Player() *Player
Player returns the player data associated to a goalscorer record.
func (*GoalScorer) Team ¶
func (g *GoalScorer) Team() *Team
Team returns the team data associated to a goalscorer record.
type GoalScorerData ¶ added in v0.1.6
type GoalScorerData struct {
Data []GoalScorer `json:"data"`
}
type Goals ¶
type Goals struct { Scored *int `json:"scored"` Assist *int `json:"assists"` Conceded *int `json:"conceded"` }
Goals provides goals stat data for a player.
type Group ¶
type Group struct { ID int `json:"id"` Name string `json:"name"` LeagueID int `json:"league_id"` SeasonID int `json:"season_id"` RoundID *int `json:"round_id"` RoundName *int `json:"round_name"` StageID int `json:"stage_id"` StageName string `json:"stage_name"` Resource string `json:"resource"` }
Group provides specific data for a group.
type GroupsData ¶ added in v0.1.6
type GroupsData struct {
Data []Group `json:"data"`
}
type HTTPClient ¶
HTTPClient is a HTTP request builder and sender.
func NewDefaultHTTPClient ¶
func NewDefaultHTTPClient(key string) *HTTPClient
NewDefaultHTTPClient creates a new Client with default settings. A key is required to instantiate the Client.
func (*HTTPClient) AggregatedTopScorersBySeasonID ¶
func (c *HTTPClient) AggregatedTopScorersBySeasonID(ctx context.Context, seasonID int, includes []string) (*AggregatedTopScorers, *Meta, error)
AggregatedTopScorersBySeasonID fetches an AggregatedTopScorers resource for a season by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) BookmakerByID ¶
BookmakerByID fetches a single Bookmaker resource by ID.
func (*HTTPClient) Bookmakers ¶
Bookmakers fetches a slice of Bookmaker resource struct.
func (*HTTPClient) CommentariesByFixtureID ¶
func (c *HTTPClient) CommentariesByFixtureID(ctx context.Context, fixtureID int) ([]Commentary, *Meta, error)
CommentariesByFixtureID fetches Commentary resources associated to a fixture.
func (*HTTPClient) ContinentByID ¶
func (c *HTTPClient) ContinentByID(ctx context.Context, id int, includes []string) (*Continent, *Meta, error)
ContinentByID fetches a Continent resource by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) Continents ¶
func (c *HTTPClient) Continents(ctx context.Context, page int, includes []string) ([]Continent, *Meta, error)
Continents fetches Continent resources. The endpoint used within this method is paginated, to select the required page use the 'page' method argument. Page information including current page and total page are included within the Meta struct. Use the includes slice of string to enrich the response data.
func (*HTTPClient) Countries ¶
func (c *HTTPClient) Countries(ctx context.Context, page int, includes []string) ([]Country, *Meta, error)
Countries fetches Country resources. The endpoint used within this method is paginated, to select the required page use the 'page' method argument. Page information including current page and total page are included within the Meta struct. Use the includes slice of string to enrich the response data.
func (*HTTPClient) CountryByID ¶
func (c *HTTPClient) CountryByID(ctx context.Context, id int, includes []string) (*Country, *Meta, error)
CountryByID fetches a Country resource by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) FixtureByID ¶
func (c *HTTPClient) FixtureByID(ctx context.Context, id int, includes []string, filters map[string][]int) (*Fixture, *Meta, error)
FixtureByID fetches a Fixture resource by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) FixturesBetween ¶
func (c *HTTPClient) FixturesBetween(ctx context.Context, from, to time.Time, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
FixturesBetween fetches multiple Fixture resources for between two dates. Use the includes slice of string to enrich the response data.
func (*HTTPClient) FixturesBetweenForTeam ¶
func (c *HTTPClient) FixturesBetweenForTeam(ctx context.Context, from, to time.Time, teamID int, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
FixturesBetweenForTeam fetches multiple Fixture resources for between two dates for a given team ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) FixturesByDate ¶
func (c *HTTPClient) FixturesByDate(ctx context.Context, date time.Time, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
FixturesByDate fetches multiple Fixture resources for a given date. Use the includes slice of string to enrich the response data.
func (*HTTPClient) FixturesByID ¶
func (c *HTTPClient) FixturesByID(ctx context.Context, ids []int, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
FixturesByID fetches multiple Fixture resources by their IDS. Use the includes slice of string to enrich the response data.
func (*HTTPClient) FixturesLastUpdated ¶
func (c *HTTPClient) FixturesLastUpdated(ctx context.Context, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
FixturesLastUpdated fetches multiple Fixture resources of fixtures that were most recently updated. Use the includes slice of string to enrich the response data.
func (*HTTPClient) HeadToHead ¶
func (c *HTTPClient) HeadToHead(ctx context.Context, idOne, idTwo int, includes []string) ([]Fixture, *Meta, error)
HeadToHead fetches multiple Fixture resources of results between two teams. Use the includes slice of string to enrich the response data.
func (*HTTPClient) InPlayOddsByFixtureID ¶
func (c *HTTPClient) InPlayOddsByFixtureID(ctx context.Context, fixtureID int) ([]MatchOdds, *Meta, error)
InPlayOddsByFixtureID fetches MatchOdds resources associated to a fixture that is in play.
func (*HTTPClient) LeagueByID ¶
func (c *HTTPClient) LeagueByID(ctx context.Context, id int, includes []string) (*League, *Meta, error)
LeagueByID fetches League resources by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) Leagues ¶
func (c *HTTPClient) Leagues(ctx context.Context, page int, includes []string) ([]League, *Meta, error)
Leagues fetches League resources. The endpoint used within this method is paginated, to select the required page use the 'page' method argument. Page information including current page and total page are included within the Meta response. Use the includes slice of string to enrich the response data.
func (*HTTPClient) LiveScores ¶
func (c *HTTPClient) LiveScores(ctx context.Context, page int, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
LiveScores fetches multiple Fixture resources for live fixtures. The endpoint used within this method is paginated, to select the required page use the 'page' method argument. Page information including current page and total page are included within the Meta response. Use the includes slice of string to enrich the response data.
func (*HTTPClient) LiveScoresInPlay ¶
func (c *HTTPClient) LiveScoresInPlay(ctx context.Context, includes []string, filters map[string][]int) ([]Fixture, *Meta, error)
LiveScoresInPlay fetches multiple Fixture resources for in play fixtures. Use the includes slice of string to enrich the response data.
func (*HTTPClient) LiveStandingsBySeasonID ¶
func (c *HTTPClient) LiveStandingsBySeasonID(ctx context.Context, seasonID int, filters map[string][]int) ([]LiveStandings, *Meta, error)
LiveStandingsBySeasonID fetches a Standings resource for a Season ID for present moment standings. Use the includes slice to enrich the response data.
func (*HTTPClient) MarketByID ¶
MarketByID fetches Market resource by ID.
func (*HTTPClient) OddsByFixtureAndBookmaker ¶
func (c *HTTPClient) OddsByFixtureAndBookmaker(ctx context.Context, fixtureID, bookmakerID int) ([]MatchOdds, *Meta, error)
OddsByFixtureAndBookmaker fetches MatchOdds resources associated to a fixture and bookmaker.
func (*HTTPClient) OddsByFixtureAndMarket ¶
func (c *HTTPClient) OddsByFixtureAndMarket(ctx context.Context, fixtureID, marketID int) ([]MatchOdds, *Meta, error)
OddsByFixtureAndMarket fetches MatchOdds resources associated to a fixture and market.
func (*HTTPClient) OddsByFixtureID ¶
func (c *HTTPClient) OddsByFixtureID(ctx context.Context, fixtureID int) ([]MatchOdds, *Meta, error)
OddsByFixtureID fetches MatchOdds resources associated to a fixture.
func (*HTTPClient) PlayerByID ¶
func (c *HTTPClient) PlayerByID(ctx context.Context, id int, includes []string) (*Player, *Meta, error)
PlayerByID fetches a Player resource by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) RoundByID ¶
func (c *HTTPClient) RoundByID(ctx context.Context, id int, includes []string) (*Round, *Meta, error)
RoundByID fetches a Round resource by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) RoundsBySeasonID ¶
func (c *HTTPClient) RoundsBySeasonID(ctx context.Context, id int, includes []string) ([]Round, *Meta, error)
RoundsBySeasonID fetches a Round resource associated to a Season by Season ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) SeasonByID ¶
func (c *HTTPClient) SeasonByID(ctx context.Context, id int, includes []string) (*Season, *Meta, error)
SeasonByID fetches a Season resource by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) Seasons ¶
func (c *HTTPClient) Seasons(ctx context.Context, page int, includes []string) ([]Season, *Meta, error)
Seasons fetches Season resources. The endpoint used within this method is paginated, to select the required page use the 'page' method argument. Page information including current page and total page are included within the Meta response. Use the includes slice of string to enrich the response data.
func (*HTTPClient) SetBaseURL ¶
func (c *HTTPClient) SetBaseURL(url string)
SetBaseURL provides functionality to over ride the default BaseURL property.
func (*HTTPClient) SetHTTPClient ¶
func (c *HTTPClient) SetHTTPClient(h *http.Client)
SetHTTPClient provides functionality to over ride the default HTTPClient property.
func (*HTTPClient) StageByID ¶
func (c *HTTPClient) StageByID(ctx context.Context, id int, includes []string) (*Stage, *Meta, error)
StageByID fetches a Stage resource by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) StagesBySeasonID ¶
func (c *HTTPClient) StagesBySeasonID(ctx context.Context, id int, includes []string) ([]Stage, *Meta, error)
StagesBySeasonID fetches a Stage resources by a season ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) StandingsBySeasonID ¶
func (c *HTTPClient) StandingsBySeasonID(ctx context.Context, seasonID int, includes []string, filters map[string][]int) ([]Standings, *Meta, error)
StandingsBySeasonID fetches a Standings resource for a Season ID. Use the includes slice to enrich the response data.
func (*HTTPClient) TVStationsByFixtureID ¶
func (c *HTTPClient) TVStationsByFixtureID(ctx context.Context, fixtureID int) ([]TVStation, *Meta, error)
TVStationsByFixtureID fetches TVStation resources for a fixture ID.
func (*HTTPClient) TeamByID ¶
func (c *HTTPClient) TeamByID(ctx context.Context, id int, includes []string, filters map[string][]int) (*Team, *Meta, error)
TeamByID fetches a Team resource by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) TeamSquad ¶
func (c *HTTPClient) TeamSquad(ctx context.Context, seasonID, teamID int, includes []string) ([]SquadPlayer, *Meta, error)
TeamSquad fetches SquadPlayer resources associated to season ID and team ID. Use the includes slice to enrich the response data.
func (*HTTPClient) TeamsBySeasonID ¶
func (c *HTTPClient) TeamsBySeasonID(ctx context.Context, seasonID, page int, includes []string) ([]Team, *Meta, error)
TeamsBySeasonID fetches Team resources associated to a season ID. The endpoint used within this method is paginated, to select the required page use the 'page' method argument. Page information including current page and total page are included within the Meta response. Use the includes slice of string to enrich the response data.
func (*HTTPClient) TopScorersBySeasonID ¶
func (c *HTTPClient) TopScorersBySeasonID(ctx context.Context, seasonID int, includes []string, filters map[string][]int) (*TopScorers, *Meta, error)
TopScorersBySeasonID fetches a TopScorers resource for a season by ID. Use the includes slice of string to enrich the response data.
func (*HTTPClient) VenuesBySeasonID ¶
VenuesBySeasonID fetches a Venue resource by season ID.
func (*HTTPClient) VideoHighlights ¶
func (c *HTTPClient) VideoHighlights(ctx context.Context, page int, includes []string) ([]VideoHighlights, *Meta, error)
VideoHighlights fetches VideoHighlight resources. The endpoint used within this method is paginated, to select the required page use the 'page' method argument. Page information including current page and total page are included within the Meta response. Use the includes slice to enrich the response data.
type League ¶
type League struct { ID int `json:"id"` Active bool `json:"active"` Type string `json:"type"` LegacyID int `json:"legacy_id"` CountryID int `json:"country_id"` LogoPath string `json:"logo_path"` Name string `json:"name"` IsCup bool `json:"is_cup"` CurrentSeasonID int `json:"current_season_id"` CurrentRoundID int `json:"current_round_id"` CurrentStageID int `json:"current_stage_id"` LiveStandings bool `json:"live_standings"` Coverage LeagueCoverage `json:"coverage"` Country CountryData `json:"country,omitempty"` Season SeasonData `json:"season,omitempty"` Seasons SeasonsData `json:"seasons,omitempty"` }
League provides a struct representation of a League resource.
func (*League) CountryData ¶
CountryData returns a Country struct associated to a League.
func (*League) SeasonData ¶
SeasonData returns the current Season struct associated to a League.
func (*League) SeasonsData ¶
SeasonsData returns a slice of Season struct associated to a League.
type LeagueCoverage ¶
type LeagueCoverage struct { Predictions bool `json:"predictions"` TopScorerGoals bool `json:"topscorer_goals"` TopScorerAssists bool `json:"topscorer_assists"` TopScorerCards bool `json:"topscorer_cards"` }
LeagueCoverage explains the coverage the API covers for a league.
type LeagueData ¶ added in v0.1.6
type LeagueData struct {
Data *League `json:"data"`
}
type LeagueStanding ¶
type LeagueStanding struct { Position int `json:"position"` TeamID int `json:"team_id"` TeamName string `json:"team_name"` RoundID int `json:"round_id"` RoundName int `json:"round_name"` GroupID *int `json:"group_id"` GroupName *int `json:"group_name"` Overall TeamLeagueStats `json:"overall"` Home TeamLeagueStats `json:"home"` Away TeamLeagueStats `json:"away"` Total TeamLeagueTotalStats `json:"total"` Result *string `json:"result"` Points int `json:"points"` RecentForm string `json:"recent_form"` Status string `json:"status"` LeagueData LeagueData `json:"league"` RoundData RoundData `json:"round"` SeasonData SeasonData `json:"season"` StagesData StagesData `json:"stages"` TeamData TeamData `json:"team"` }
LeagueStanding provides a struct representation of a LeagueStanding resource.
func (*LeagueStanding) League ¶
func (s *LeagueStanding) League() *League
League returns league data.
func (*LeagueStanding) Season ¶
func (s *LeagueStanding) Season() *Season
Season returns season data.
func (*LeagueStanding) Stages ¶
func (s *LeagueStanding) Stages() []Stage
Stages returns stages data.
type LeagueStandingData ¶ added in v0.1.6
type LeagueStandingData struct {
Data []LeagueStanding `json:"data"`
}
type LeaguesData ¶ added in v0.1.6
type LeaguesData struct {
Data []League `json:"data"`
}
type LiveStandings ¶
type LiveStandings struct { Position int `json:"position"` Played int `json:"played"` TeamID int `json:"team_id"` TeamName string `json:"team_name"` ShortCode string `json:"short_code"` TeamLogo string `json:"team_logo"` Goals string `json:"goals"` GoalDiff int `json:"goal_diff"` Wins int `json:"wins"` Lost int `json:"lost"` Draws int `json:"draws"` Points int `json:"points"` Description string `json:"description"` FairPlayPointsLose int `json:"fairplay_points_lose"` }
LiveStandings provides league standing information for a team.
type MatchCommentaryData ¶ added in v0.1.6
type MatchCommentaryData struct {
Data []Commentary `json:"data"`
}
type MatchEvent ¶
type MatchEvent struct { ID int64 `json:"id"` TeamID string `json:"team_id"` Type string `json:"type"` FixtureID int `json:"fixture_id"` PlayerID int `json:"player_id"` PlayerName string `json:"player_name"` RelatedPlayerID int `json:"related_player_id"` RelatedPlayerName string `json:"related_player_name"` Minute int `json:"minute"` ExtraMinute *int `json:"extra_minute"` Reason *string `json:"reason"` Injured *bool `json:"injuried"` Result string `json:"result"` }
MatchEvent provides generic information for a match event.
type MatchEventsData ¶ added in v0.1.6
type MatchEventsData struct {
Data []MatchEvent `json:"data"`
}
type MatchHighlightsData ¶ added in v0.1.6
type MatchHighlightsData struct {
Data []VideoHighlights `json:"data"`
}
type MatchOdds ¶
type MatchOdds struct { ID int `json:"id"` Name string `json:"name"` Suspended bool `json:"suspended"` BookmakerOddsData BookmakerOddsData `json:"bookmaker"` }
MatchOdds provides a struct representation of a MatchOdds resource.
func (*MatchOdds) BookmakerOdds ¶
func (m *MatchOdds) BookmakerOdds() []BookmakerOdds
BookmakerOdds returns bookmaker specific odds for a match.
type MatchOfficial ¶
type MatchOfficial struct { ID int `json:"id"` CommonName string `json:"common_name"` FullName string `json:"fullname"` FirstName string `json:"firstname"` LastName string `json:"lastname"` }
MatchOfficial provides personal information for a match official.
type MatchOfficialData ¶ added in v0.1.6
type MatchOfficialData struct {
Data *MatchOfficial `json:"data"`
}
type MatchPasses ¶
type MatchPasses struct { TotalCrosses *int `json:"total_crosses"` CrossesAccuracy *int `json:"crosses_accuracy"` Passes *int `json:"passes"` PassesAccuracy *int `json:"passes_accuracy"` KeyPasses *int `json:"key_passes"` }
MatchPasses provide pass data for a player in a fixture.
type MatchTVStationsData ¶ added in v0.1.6
type MatchTVStationsData struct {
Data []TVStation `json:"data"`
}
type Meta ¶
type Meta struct { Pagination *Pagination `json:"pagination,omitempty"` Plan *Plan `json:"plan,omitempty"` Sports *Sports `json:"sports,omitempty"` }
Meta struct.
type Odds ¶
type Odds struct { Value *FlexFloat `json:"value"` Handicap *string `json:"handicap"` Total string `json:"total"` Label string `json:"label"` Probability string `json:"probability"` Dp3 string `json:"dp3"` American int `json:"american"` Fractional *string `json:"factional"` Winning *string `json:"winning"` Stop bool `json:"stop"` BookmakerEventID *FlexInt `json:"bookmaker_event_id"` LastUpdate DateTime `json:"last_update"` }
Odds provides a struct representation of an Odds resource.
type Pagination ¶
type Pagination struct { Total int `json:"total"` Count int `json:"count"` PerPage int `json:"per_page"` CurrentPage int `json:"current_page"` TotalPages int `json:"total_pages"` }
Pagination struct.
type Passes ¶
type Passes struct { Total int `json:"total"` Accuracy *int `json:"accuracy"` KeyPasses *int `json:"key_passes"` }
Passes explains pass stat data for a player.
type Penalties ¶
type Penalties struct { Won *int `json:"won"` Scores *int `json:"scores"` Missed *int `json:"missed"` Committed *int `json:"committed"` Saves *int `json:"saves"` }
Penalties explains penalty stat data for a player.
type Plan ¶
type Plan struct { Name string `json:"name"` Price string `json:"price"` RequestLimit string `json:"request_limit"` }
Plan struct.
type Player ¶
type Player struct { ID int `json:"player_id"` TeamID int `json:"team_id"` CountryID int `json:"country_id"` PositionID int `json:"position_id"` CommonName string `json:"common_name"` FullName string `json:"fullname"` FirstName string `json:"firstname"` LastName string `json:"lastname"` Nationality string `json:"nationality"` BirthDate string `json:"birthdate"` BirthCountry string `json:"birthcountry"` BirthPlace string `json:"birthplace"` Height string `json:"height"` Weight string `json:"weight"` ImagePath string `json:"image_path"` CountryData CountryData `json:"country"` LineupData PlayerLineupData `json:"lineups,omitempty"` PositionData PositionData `json:"position,omitempty"` SidelinedData SidelinedData `json:"sidelined,omitempty"` StatsData PlayerSeasonStatsData `json:"stats,omitempty"` TeamData TeamData `json:"team,omitempty"` TransfersData TransfersData `json:"transfers,omitempty"` TrophyData TrophyData `json:"trophies,omitempty"` }
Player provides a struct representation of a Player resource.
func (*Player) Lineup ¶
func (p *Player) Lineup() []PlayerStats
Lineup return historic player stats information for individual fixtures.
type PlayerData ¶ added in v0.1.6
type PlayerData struct {
Data *Player `json:"data"`
}
type PlayerLineupData ¶ added in v0.1.6
type PlayerLineupData struct {
Data []PlayerStats `json:"data"`
}
type PlayerMatchStats ¶
type PlayerMatchStats struct { Shots Shots `json:"shots"` Goals Goals `json:"goals"` Fouls Fouls `json:"fouls"` Cards Cards `json:"cards"` Passing MatchPasses `json:"passing"` Dribbles Player `json:"dribbles"` Duels Duels `json:"duels"` Other AdditionalPlayerMatchStats `json:"other"` }
PlayerMatchStats provides stats for a player for a specific fixture.
type PlayerSeasonStats ¶
type PlayerSeasonStats struct { PlayerID int `json:"player_id"` TeamID int `json:"team_id"` LeagueID int `json:"league_id"` SeasonID int `json:"season_id"` Captain int `json:"captain"` Minutes int `json:"minutes"` Appearances int `json:"appearences"` Lineups int `json:"lineups"` SubstituteIn int `json:"substitute_in"` SubstituteOut int `json:"substitute_out"` SubstitutesOnBench int `json:"substitutes_on_bench"` Goals int `json:"goals"` Assists int `json:"assists"` Saves int `json:"saves"` InsideBoxSaves int `json:"inside_box_saves"` Dispossessed int `json:"dispossesed"` Interceptions int `json:"interceptions"` YellowCards int `json:"yellowcards"` YellowRed int `json:"yellowred"` RedCards int `json:"redcards"` Type string `json:"type"` Tackles *int `json:"tackles"` Blocks *int `json:"blocks"` HitPost *int `json:"hit_post"` Fouls Fouls `json:"fouls"` Crosses Crosses `json:"crosses"` Dribbles Dribbles `json:"dribbles"` Duels Duels `json:"duels"` Passes Passes `json:"passes"` Penalties Penalties `json:"penalties"` PlayerData PlayerData `json:"player,omitempty"` }
PlayerSeasonStats provides stats for a player for a specific season.
type PlayerSeasonStatsData ¶ added in v0.1.6
type PlayerSeasonStatsData struct {
Data []PlayerSeasonStats `json:"data"`
}
type PlayerStats ¶
type PlayerStats struct { TeamID int `json:"team_id"` FixtureID int `json:"fixture_id"` PlayerID int `json:"player_id"` PlayerName string `json:"player_name"` Number int `json:"number"` Position *string `json:"position"` AdditionalPosition *string ` json:"additional_position"` FormationPosition *int `json:"formation_position"` PositionX *int `json:"posx"` PositionY *int `json:"posy"` Captain bool `json:"captain"` Stats PlayerMatchStats `json:"stats"` }
PlayerStats provides basic player data linked to stats.
type PositionData ¶ added in v0.1.6
type PositionData struct {
Data *Position `json:"data"`
}
type Ranking ¶
type Ranking struct { TeamID int `json:"team_id"` Points float64 `json:"points"` Coefficient int `json:"coeffiecient"` Position int `json:"position"` PositionStatus string `json:"position_status"` PositionWonOrLost int `json:"position_won_or_lost"` }
Ranking provides ranking data for a team.
type RankingData ¶ added in v0.1.6
type RankingData struct {
Data *Ranking `json:"data"`
}
type Round ¶
type Round struct { ID int `json:"id"` Name int `json:"name"` LeagueID int `json:"league_id"` SeasonID int `json:"season_id"` StageID int `json:"stage_id"` Start string `json:"start"` End string `json:"end"` FixturesData FixturesData `json:"fixtures,omitempty"` LeagueData LeagueData `json:"league"` ResultsData FixturesData `json:"results,omitempty"` SeasonData SeasonData `json:"season"` }
Round provides a struct representation of a Round resource.
type RoundsData ¶ added in v0.1.6
type RoundsData struct {
Data []Round `json:"data"`
}
type Scores ¶
type Scores struct { LocalTeamScore int `json:"localteam_score"` VisitorTeamScore int `json:"visitorteam_score"` LocalTeamPenScore *int `json:"localteam_pen_score"` VisitorTeamPenScore *int `json:"visitorteam_pen_score"` HTScore *string `json:"ht_score"` FTScore *string `json:"ft_score"` ETScore *string `json:"et_score"` PSScore *string `json:"ps_score"` }
Scores provides score data for a fixture.
type Season ¶
type Season struct { ID int `json:"id"` Name string `json:"name"` LeagueID int `json:"league_id"` IsCurrentSeason bool `json:"is_current_season"` CurrentRoundID *int `json:"current_round_id"` CurrentStageID *int `json:"current_stage_id"` AggregatedAssistScorerData AggregatedAssistScorerData `json:"aggregatedAssistscorers,omitempty"` AggregatedCardScorerData AggregatedCardScorerData `json:"aggregatedCardscorers,omitempty"` AggregatedGoalScorerData AggregatedGoalScorerData `json:"aggregatedGoalscorers,omitempty"` AssistScorerData AssistScorerData `json:"assistscorers,omitempty"` CardScorerData CardScorerData `json:"cardscorers,omitempty"` FixturesData FixturesData `json:"fixtures,omitempty"` GoalScorerData GoalScorerData `json:"goalscorers,omitempty"` GroupsData GroupsData `json:"groups,omitempty"` LeagueData LeagueData `json:"league,omitempty"` ResultsData FixturesData `json:"results,omitempty"` RoundsData RoundsData `json:"rounds,omitempty"` StagesData StagesData `json:"stages,omitempty"` Upcoming FixturesData `json:"upcoming,omitempty"` }
Season provides a struct representation of a Season resource.
func (*Season) AggregatedAssistScorers ¶
func (s *Season) AggregatedAssistScorers() []AssistScorer
AggregatedAssistScorers returns aggregated assist scorer data.
func (*Season) AggregatedCardScorers ¶
func (s *Season) AggregatedCardScorers() []CardScorer
AggregatedCardScorers returns aggregated card scorer data.
func (*Season) AggregatedGoalScorers ¶
func (s *Season) AggregatedGoalScorers() []GoalScorer
AggregatedGoalScorers returns aggregated goal scorer data.
func (*Season) AssistScorers ¶
func (s *Season) AssistScorers() []AssistScorer
AssistScorers returns aggregated assist data.
func (*Season) CardScorers ¶
func (s *Season) CardScorers() []CardScorer
CardScorers returns card scorer data.
func (*Season) GoalScorers ¶
func (s *Season) GoalScorers() []GoalScorer
GoalScorers returns goal scorer data.
func (*Season) UpcomingFixtures ¶
UpcomingFixtures returns upcoming fixture data.
type SeasonData ¶ added in v0.1.6
type SeasonData struct {
Data *Season `json:"data"`
}
type SeasonsData ¶ added in v0.1.6
type SeasonsData struct {
Data []Season `json:"data"`
}
type Sidelined ¶
type Sidelined struct { PlayerID int `json:"player_id"` SeasonID int `json:"season_id"` TeamID int `json:"team_id"` Description string `json:"description"` StartDate string `json:"start_date"` }
Sidelined provides injury data for a player.
type SidelinedData ¶ added in v0.1.6
type SidelinedData struct {
Data []Sidelined `json:"data"`
}
type SquadPlayer ¶
type SquadPlayer struct { PlayerID int `json:"player_id"` PositionID int `json:"position_id"` Number int `json:"number"` Captain int `json:"captain"` Injured bool `json:"injured"` Minutes int `json:"minutes"` Appearances int `json:"appearences"` Lineups int `json:"lineups"` SubstituteIn int `json:"substitute_in"` SubstituteOut int `json:"substitute_out"` SubstitutesOnBench int `json:"substitutes_on_bench"` Goals int `json:"goals"` Assists int `json:"assists"` Saves *int `json:"saves"` InsideBoxSaves *int `json:"inside_box_saves"` Dispossessed *int `json:"dispossesed"` Interceptions *int `json:"interceptions"` YellowCards int `json:"yellowcards"` YellowRed int `json:"yellowred"` RedCards int `json:"redcards"` Tackles *int `json:"tackles"` Blocks *int `json:"blocks"` HitPost *int `json:"hit_post"` Fouls Fouls `json:"fouls"` Crosses Crosses `json:"crosses"` Dribbles Dribbles `json:"dribbles"` Duels Duels `json:"duels"` Passes Passes `json:"passes"` Penalties Penalties `json:"penalties"` PlayerData PlayerData `json:"player"` }
SquadPlayer provides a struct representation of a SquadPlayer resource.
func (*SquadPlayer) Player ¶
func (s *SquadPlayer) Player() *Player
Player returns the player specific data.
type SquadPlayerData ¶ added in v0.1.6
type SquadPlayerData struct {
Data []SquadPlayer `json:"data"`
}
type Stage ¶
type Stage struct { ID int `json:"id"` Name string `json:"name"` Type *string `json:"type"` LeagueID int `json:"league_id"` SeasonID int `json:"season_id"` SortOrder *string `json:"sort_order"` HasStandings *bool `json:"has_standings"` FixturesData FixturesData `json:"fixtures,omitempty"` LeagueData LeagueData `json:"league,omitempty"` ResultsData FixturesData `json:"results,omitempty"` SeasonData SeasonData `json:"season,omitempty"` }
Stage provides a struct representation of a Stage resource.
type StagesData ¶ added in v0.1.6
type StagesData struct {
Data []Stage `json:"data"`
}
type Standings ¶
type Standings struct { Name string `json:"name"` LeagueID int `json:"league_id"` SeasonID int `json:"season_id"` RoundID int `json:"round_id"` RoundName int `json:"round_name"` Type string `json:"type"` StageID int `json:"stage_id"` StageName string `json:"stage_name"` Resource string `json:"resource"` LeagueStandingData LeagueStandingData `json:"standings"` }
Standings provides a struct representation of a Standings resource.
func (*Standings) LeagueStandings ¶
func (s *Standings) LeagueStandings() []LeagueStanding
LeagueStandings returns league standing resources describing team specific league information.
type SubstitutionEvent ¶
type SubstitutionEvent struct { ID int `json:"id"` TeamID string `json:"team_id"` Type string `json:"type"` FixtureID int `json:"fixture_id"` PlayerInID int `json:"player_in_id"` PlayerInName string `json:"player_in_name"` PlayerOutID int `json:"player_out_id"` PlayerOutName string `json:"player_out_name"` Minute int `json:"minute"` ExtraMinute *int `json:"extra_minute"` Injured *bool `json:"injuried"` }
SubstitutionEvent provides details of a substitution event.
type SubstitutionEventsData ¶ added in v0.1.6
type SubstitutionEventsData struct {
Data []SubstitutionEvent `json:"data"`
}
type Team ¶
type Team struct { ID int `json:"id"` LegacyID int `json:"legacy_id"` Name string `json:"name"` ShortCode string `json:"short_code"` Twitter *string `json:"twitter"` CountryID int `json:"country_id"` NationalTeam bool `json:"national_team"` Founded int `json:"founded"` LogoPath *string `json:"logo_path"` VenueID int `json:"venue_id"` CurrentSeasonID int `json:"current_season_id"` AggregatedAssistScorerData AggregatedAssistScorerData `json:"aggregatedAssistscorers,omitempty"` AggregatedCardScorerData AggregatedCardScorerData `json:"aggregatedCardscorers,omitempty"` AggregatedGoalScorerData AggregatedGoalScorerData `json:"aggregatedGoalscorers,omitempty"` AssistScorerData AssistScorerData `json:"assistscorers,omitempty"` CardScorerData CardScorerData `json:"cardscorers,omitempty"` CoachData CoachData `json:"coach,omitempty"` CountryData CountryData `json:"country,omitempty"` FIFARankingData RankingData `json:"fifaranking"` GoalScorerData GoalScorerData `json:"goalscorers,omitempty"` Latest FixturesData `json:"latest,omitempty"` LeagueData LeagueData `json:"league,omitempty"` LocalFixtureData FixturesData `json:"localFixtures,omitempty"` SidelinedData SidelinedData `json:"sidelined,omitempty"` SquadData SquadPlayerData `json:"squad,omitempty"` StatsData TeamSeasonStatsData `json:"stats,omitempty"` TransfersData TransfersData `json:"transfers,omitempty"` UEFARankingData RankingData `json:"uefaranking. omitempty"` Upcoming FixturesData `json:"upcoming,omitempty"` VenueData VenueData `json:"venue,omitempty"` VisitorFixtureData FixturesData `json:"visitorFixtures,omitempty"` VisitorResultData FixturesData `json:"visitorResults,omitempty"` }
Team provides a struct representation of a Team resource.
func (*Team) AggregatedAssistScorers ¶
func (t *Team) AggregatedAssistScorers() []AssistScorer
AggregatedAssistScorers returns aggregated assist scorer data.
func (*Team) AggregatedCardScorers ¶
func (t *Team) AggregatedCardScorers() []CardScorer
AggregatedCardScorers returns aggregated card scorer data.
func (*Team) AggregatedGoalScorers ¶
func (t *Team) AggregatedGoalScorers() []CardScorer
AggregatedGoalScorers returns aggregated goal scorer data.
func (*Team) AssistScorers ¶
func (t *Team) AssistScorers() []AssistScorer
AssistScorers returns assist scorer data.
func (*Team) CardScorers ¶
func (t *Team) CardScorers() []CardScorer
CardScorers returns card scorer data.
func (*Team) FIFARanking ¶
FIFARanking returns the current FIFA ranking.
func (*Team) GoalScorers ¶
func (t *Team) GoalScorers() []GoalScorer
GoalScorers returns goal scorer data.
func (*Team) LatestResults ¶
LatestResults returns the latest completed fixture information.
func (*Team) LocalFixtures ¶
LocalFixtures returns all fixture data.
func (*Team) Stats ¶
func (t *Team) Stats() *TeamSeasonStats
Stats returns the aggregated team stats for the current season
func (*Team) UEFARanking ¶
UEFARanking returns the current UEFA ranking.
func (*Team) UpcomingFixtures ¶
UpcomingFixtures returns all upcoming fixture data.
func (*Team) VisitorFixtures ¶
VisitorFixtures returns all upcoming fixture data for the opposition team.
func (*Team) VisitorResults ¶
VisitorResults returns all completed fixture data for the opposition team.
type TeamAttacks ¶
type TeamAttacks struct { Total *FlexInt `json:"attacks"` Dangerous *FlexInt `json:"dangerous_attacks"` }
TeamAttacks provides attack data for a team in a fixture.
type TeamColors ¶
type TeamColors struct { LocalTeam *KitColors `json:"localteam,omitempty"` VisitorTeam *KitColors `json:"visitorteam,omitempty"` }
TeamColors provides kid color data for a team in a fixture.
type TeamLeagueStats ¶
type TeamLeagueStats struct { GamesPlayed int `json:"games_played"` Won int `json:"won"` Draw int `json:"draw"` Lost int `json:"lost"` GoalsScored int `json:"goals_scored"` GoalsAgainst int `json:"goals_against"` }
TeamLeagueStats provides basic league stat data for a team.
type TeamLeagueTotalStats ¶
type TeamLeagueTotalStats struct { GoalDifference int `json:"goal_difference"` Points int `json:"points"` }
TeamLeagueTotalStats provides league stat data for a team.
type TeamPasses ¶
type TeamPasses struct { Total *FlexInt `json:"total"` Accurate *FlexInt `json:"accurate"` Percentage *float32 `json:"percentage"` }
TeamPasses provides pass data for a team in a fixture.
type TeamSeasonStats ¶
type TeamSeasonStats struct { TeamID int `json:"team_id"` SeasonID int `json:"season_id"` StageID *int `json:"stage_id"` Win struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"win"` Draw struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"draw"` Lost struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"lost"` GoalsFor struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"goals_for"` GoalsAgainst struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"goals_against"` CleanSheet struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"clean_sheet"` FailedToScore struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"failed_to_score"` ScoringMinutes []struct { Period []struct { Minute string `json:"minute"` Count string `json:"count"` Percentage string `json:"percentage"` } `json:"period"` } `json:"scoring_minutes"` AvgGoalsPerGameScored struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"avg_goals_per_game_scored"` AvgGoalsPerGameConceded struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"avg_goals_per_game_conceded"` AvgFirstGoalScored struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"avg_first_goal_scored"` AvgFirstGoalConceded struct { Total string `json:"total"` Home string `json:"home"` Away string `json:"away"` } `json:"avg_first_goal_conceded"` Attacks *int `json:"attacks"` DangerousAttacks *int `json:"dangerous_attacks"` AvgBallPossessionPercentage *int `json:"avg_ball_possession_percentage"` Fouls *int `json:"fouls"` AvgFoulsPerGame *int `json:"avg_fouls_per_game"` Offsides *int `json:"offsides"` RedCards *int `json:"redcards"` YellowCards *int `json:"yellowcards"` ShotsBlocked *int `json:"shots_blocked"` ShotsOffTarget *int `json:"shots_off_target"` AvgShotsOffTargetPerGame *int `json:"avg_shots_off_target_per_game"` ShotsOnTarget *int `json:"shots_on_target"` AvgShotsOnTargetPerGame *int `json:"avg_shots_on_target_per_game"` BTTS *int `json:"btts"` GoalLine *int `json:"goal_line"` }
TeamSeasonStats provides in depth league data for a team.
type TeamSeasonStatsData ¶ added in v0.1.6
type TeamSeasonStatsData struct {
Data *TeamSeasonStats `json:"data"`
}
type TeamShots ¶
type TeamShots struct { Total *FlexInt `json:"total"` OnGoal *FlexInt `json:"ongoal"` OffGoal *FlexInt `json:"offgoal"` Blocked *FlexInt `json:"blocked"` InsideBox *FlexInt `json:"insidebox"` OutsideBox *FlexInt `json:"outsidebox"` }
TeamShots provides pass data for a team in a fixture.
type TeamStandings ¶
type TeamStandings struct { LocalTeamPosition int `json:"localteam_position"` VisitorTeamPosition int `json:"visitorteam_position"` }
TeamStandings provides current league standings for teams in a fixture.
type TeamStats ¶
type TeamStats struct { TeamID int `json:"team_id"` FixtureID int `json:"fixture_id"` Shots TeamShots `json:"shots"` Passes TeamPasses `json:"passes"` Attacks TeamAttacks `json:"attacks"` Fouls *int `json:"fouls"` Corners *int `json:"corners"` Offsides *int `json:"offsides"` PossessionTime *int `json:"possessiontime"` YellowCards *int `json:"yellowcards"` RedCards *int `json:"redcards"` Saves *int `json:"saves"` Substitutions *int `json:"substitutions"` GoalKick *int `json:"goal_kick"` GoalAttempts *int `json:"goal_attempts"` FreeKick *int `json:"free_kick"` ThrowIn *int `json:"throw_in"` BallSafe *int `json:"ball_safe"` Goals *int `json:"goals"` Penalties *int `json:"penalties"` Injuries *int `json:"injuries"` }
TeamStats provides in depth stat data for a team in a fixture.
type TeamsStatsData ¶ added in v0.1.6
type TeamsStatsData struct {
Data []TeamStats `json:"data"`
}
type TopScorers ¶
type TopScorers struct { ID int `json:"id"` Name string `json:"name"` LeagueID int `json:"league_id"` IsCurrentSeason bool `json:"is_current_season"` CurrentRoundID *int `json:"current_round_id"` CurrentStageID *int `json:"current_stage_id"` AssistScorerData AssistScorerData `json:"assistscorers"` CardScorerData CardScorerData `json:"cardscorers"` GoalScorerData GoalScorerData `json:"goalscorers"` }
TopScorers provides a struct representation of a TopScorers resource.
func (*TopScorers) AssistScorers ¶
func (t *TopScorers) AssistScorers() []AssistScorer
AssistScorers returns assist scorer data.
func (*TopScorers) CardScorers ¶
func (t *TopScorers) CardScorers() []CardScorer
CardScorers returns card scorer data.
func (*TopScorers) GoalScorers ¶
func (t *TopScorers) GoalScorers() []GoalScorer
GoalScorers returns goal scorer data.
type Transfer ¶
type Transfer struct { PlayerID int `json:"player_id"` FromTeamID int `json:"from_team_id"` ToTeamID int `json:"to_team_id"` SeasonID *int `json:"season_id"` Transfer string `json:"transfer"` Type string `json:"type"` Date string `json:"date"` Amount *string `json:"amount"` }
Transfer provides transfer data for a player.
type TransfersData ¶ added in v0.1.6
type TransfersData struct {
Data []Transfer `json:"data"`
}
type Trophy ¶
type Trophy struct { PlayerID int `json:"player_id"` Status string `json:"status"` Times int `json:"times"` League string `json:"league"` LeagueID int `json:"league_id"` Seasons SeasonsData `json:"seasons"` }
Trophy provides trophy data for a player.
type TrophyData ¶ added in v0.1.6
type TrophyData struct {
Data []Trophy `json:"data"`
}
type Venue ¶
type Venue struct { ID int `json:"id"` Name string `json:"name"` Surface string `json:"surface"` Address *string `json:"address"` City string `json:"city"` Capacity int `json:"capacity"` ImagePath string `json:"image_path"` Coordinates *string `json:"coordinates"` }
Venue provides a struct representation of a Venue resource.
type VideoHighlights ¶
type VideoHighlights struct { FixtureID int `json:"fixture_id"` EventID *int `json:"event_id"` Location string `json:"location"` Type string `json:"type"` CreatedAt DateTime `json:"created_at"` FixtureData FixtureData `json:"fixture,omitempty"` }
VideoHighlights provides a struct representation of a VideoHighlights resource.
func (*VideoHighlights) Fixture ¶
func (v *VideoHighlights) Fixture() *Fixture
Fixture returns associated fixture data.
type WeatherReport ¶
type WeatherReport struct { Code string `json:"code"` Type string `json:"type"` Icon string `json:"icon"` Temperature struct { Temp float64 `json:"temp"` Unit string `json:"unit"` } `json:"temperature"` TemperatureCelcius struct { Temp float64 `json:"temp"` Unit string `json:"unit"` } `json:"temperature_celcius"` Clouds string `json:"clouds"` Humidity string `json:"humidity"` Pressure *float64 `json:"pressure"` Wind struct { Speed string `json:"speed"` Degree *float64 `json:"degree"` } `json:"wind"` Coordinates struct { Lat *float64 `json:"lat"` Lon *float64 `json:"lon"` } UpdatedAt *string `json:"updated_at"` }
WeatherReport provides weather data for a fixture.
Source Files ¶
- bookmakers.go
- coaches.go
- commentaries.go
- continents.go
- countries.go
- errors.go
- fixtures.go
- helpers.go
- http.go
- leagues.go
- livescores.go
- markets.go
- meta.go
- odds.go
- players.go
- rounds.go
- seasons.go
- stages.go
- standings.go
- team_squads.go
- teams.go
- topscorers.go
- tv_stations.go
- type.go
- venues.go
- video_highlights.go