sportmonks

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 9 Imported by: 0

README

Statistico SportMonks Go Client

Documentation CircleCI

This library is a Golang wrapper around version 2.0 of the SportMonks soccer API. Full documentation and API reference can be found here:

Documentation

API Reference

Installation

$ go get -u github.com/statistico/statistico-sportmonks-go-client

Usage

To instantiate the required HTTPClient struct and retrieve a single League resource:

package main

import (
    "context"
    "fmt"
    "github.com/statistico/statistico-sportmonks-go-client"
)

func main() {
    client := sportmonks.NewDefaultHTTPClient("YOUR_TOKEN_GOES_HERE")
    
    league, _, err := client.LeagueByID(context.Background(), 10, []string{}) 

    if err != nil {
        fmt.Printf("%s\n", err.Error())
        return
    }

    // Do something with league variable
}

The SportMonks soccer API provides powerful 'includes' and 'filtering' features that allow you to enrich data requests. Full documentation on API flexibility, relationships and includes functionality can be found here. Instructions on how to use the filtering parameters and sort functionality can be found here.

For more detailed examples on how to use this library please see the docs directory

Contributing

You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you notice any problems or would like to suggest improvements.

Documentation

Index

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 Bookmaker

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

Bookmaker provides a struct representation of a Bookmaker resource

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 Cards

type Cards struct {
	YellowCards *int `json:"yellowcards"`
	RedCards    *int `json:"redcards"`
}

Cards provides cards received by a player.

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 CoachData added in v0.1.6

type CoachData struct {
	Data *Coach `json:"data"`
}

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.

func (*Continent) Countries

func (c *Continent) Countries() []Country

Countries returns a Country struct slice associated to a Continent.

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.

func (*Country) Continent

func (c *Country) Continent() *Continent

Continent returns a Continent struct associated to a Country.

func (*Country) Leagues

func (c *Country) Leagues() []League

Leagues returns a League struct slice associated to a Country.

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 Crosses

type Crosses struct {
	Total    *int `json:"total"`
	Accurate *int `json:"accurate"`
}

Crosses explains cross stat data for a player.

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 Duels

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

Duels explains duel 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) Cards

func (f *Fixture) Cards() []CardEvent

Cards returns CardEvents 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) FlatOdds

func (f *Fixture) FlatOdds() []MatchOdds

FlatOdds returns flat odds data for a fixture.

func (*Fixture) FourthOfficial

func (f *Fixture) FourthOfficial() *MatchOfficial

FourthOfficial return fourth official data for a fixture.

func (*Fixture) Goals

func (f *Fixture) Goals() []GoalEvent

Goals returns GoalEvents for a fixture.

func (*Fixture) Highlights

func (f *Fixture) Highlights() []VideoHighlights

Highlights returns video highlights data for a fixture.

func (*Fixture) InPlayOdds

func (f *Fixture) InPlayOdds() []MatchOdds

InPlayOdds returns in play odds data for a fixture.

func (*Fixture) League

func (f *Fixture) League() *League

League returns league 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

func (f *Fixture) LocalCoach() *Coach

LocalCoach returns coach data for the home team.

func (*Fixture) LocalTeam

func (f *Fixture) LocalTeam() *Team

LocalTeam return team data for the home team.

func (*Fixture) Odds

func (f *Fixture) Odds() []MatchOdds

Odds returns bookmaker odds data for a fixture.

func (*Fixture) Referee

func (f *Fixture) Referee() *MatchOfficial

Referee returns referee data for a fixture.

func (*Fixture) Round

func (f *Fixture) Round() *Round

Round returns round data for a fixture.

func (*Fixture) SecondAssistant

func (f *Fixture) SecondAssistant() *MatchOfficial

SecondAssistant return second assistant data for a fixture.

func (*Fixture) Sidelined

func (f *Fixture) Sidelined() []Sidelined

Sidelined returns player data for injured players.

func (*Fixture) Stage

func (f *Fixture) Stage() *Stage

Stage returns round stage for a fixture.

func (*Fixture) Substitutions

func (f *Fixture) Substitutions() []SubstitutionEvent

Substitutions returns SubstitutionEvents for a fixture.

func (*Fixture) TVStations

func (f *Fixture) TVStations() []TVStation

TVStations return tv station data for a fixture.

func (*Fixture) TeamStats

func (f *Fixture) TeamStats() []TeamStats

TeamStats returns stats data for home and away teams.

func (*Fixture) Venue

func (f *Fixture) Venue() *Venue

Venue returns round venue for a fixture.

func (*Fixture) VisitorCoach

func (f *Fixture) VisitorCoach() *Coach

VisitorCoach returns coach data for the away team.

func (*Fixture) VisitorTeam

func (f *Fixture) VisitorTeam() *Team

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

func (fi *FlexFloat) UnmarshalJSON(b []byte) error

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

func (fi *FlexInt) UnmarshalJSON(b []byte) error

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 Fouls

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

Fouls explains foul stat data for a player.

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

type HTTPClient struct {
	HTTPClient *http.Client
	BaseURL    string
	Key        string
}

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

func (c *HTTPClient) BookmakerByID(ctx context.Context, id int) (*Bookmaker, *Meta, error)

BookmakerByID fetches a single Bookmaker resource by ID.

func (*HTTPClient) Bookmakers

func (c *HTTPClient) Bookmakers(ctx context.Context) ([]Bookmaker, *Meta, error)

Bookmakers fetches a slice of Bookmaker resource struct.

func (*HTTPClient) CoachByID

func (c *HTTPClient) CoachByID(ctx context.Context, id int) (*Coach, *Meta, error)

CoachByID fetches a Coach resource by ID.

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

func (c *HTTPClient) MarketByID(ctx context.Context, id int) (*Market, *Meta, error)

MarketByID fetches Market resource by ID.

func (*HTTPClient) Markets

func (c *HTTPClient) Markets(ctx context.Context) ([]Market, *Meta, error)

Markets fetches Market resources.

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

func (c *HTTPClient) VenueByID(ctx context.Context, id int) (*Venue, *Meta, error)

VenueByID fetches a Venue resource by ID.

func (*HTTPClient) VenuesBySeasonID

func (c *HTTPClient) VenuesBySeasonID(ctx context.Context, id int) ([]Venue, *Meta, error)

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 KitColors

type KitColors struct {
	Color    *string `json:"color"`
	KitColor *string `json:"kit_colors"`
}

KitColors provides additional information of colors a team wore in a fixture.

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

func (l *League) CountryData() *Country

CountryData returns a Country struct associated to a League.

func (*League) SeasonData

func (l *League) SeasonData() *Season

SeasonData returns the current Season struct associated to a League.

func (*League) SeasonsData

func (l *League) SeasonsData() []Season

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

func (s *LeagueStanding) Round() *Round

Round returns round 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.

func (*LeagueStanding) Team

func (s *LeagueStanding) Team() *Team

Team return team 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"`
	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 Market

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

Market provides a struct representation of a Market resource.

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 OddsData added in v0.1.6

type OddsData struct {
	Data []Odds `json:"data"`
}

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

func (p *Player) Country() *Country

Country returns Country data.

func (*Player) Lineup

func (p *Player) Lineup() []PlayerStats

Lineup return historic player stats information for individual fixtures.

func (*Player) Position

func (p *Player) Position() *Position

Position returns position data.

func (*Player) Sidelined

func (p *Player) Sidelined() []Sidelined

Sidelined returns injury information.

func (*Player) Stats

func (p *Player) Stats() []PlayerSeasonStats

Stats returns season stats.

func (*Player) Team

func (p *Player) Team() *Team

Team returns Team data.

func (*Player) Transfers

func (p *Player) Transfers() []Transfer

Transfers returns transfer information.

func (*Player) Trophies

func (p *Player) Trophies() []Trophy

Trophies returns trophy information.

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 Position

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

Position provides position data for a player.

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.

func (*Round) Fixtures

func (r *Round) Fixtures() []Fixture

Fixtures returns a slice of Fixture struct associated to a Round.

func (*Round) League

func (r *Round) League() *League

League returns a League struct associated to a Round.

func (*Round) Results

func (r *Round) Results() []Fixture

Results returns a slice of completed Fixture struct associated to a Round.

func (*Round) Season

func (r *Round) Season() *Season

Season returns a League struct associated to a Round.

type RoundData added in v0.1.6

type RoundData struct {
	Data *Round `json:"data"`
}

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

func (s *Season) Fixtures() []Fixture

Fixtures returns all fixture data.

func (*Season) GoalScorers

func (s *Season) GoalScorers() []GoalScorer

GoalScorers returns goal scorer data.

func (*Season) Groups

func (s *Season) Groups() []Group

Groups returns all group data.

func (*Season) League

func (s *Season) League() *League

League returns league information.

func (*Season) Results

func (s *Season) Results() []Fixture

Results returns all completed fixture data.

func (*Season) Rounds

func (s *Season) Rounds() []Round

Rounds returns all round data.

func (*Season) Stages

func (s *Season) Stages() []Stage

Stages returns all stage data.

func (*Season) UpcomingFixtures

func (s *Season) UpcomingFixtures() []Fixture

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 Shots

type Shots struct {
	Total  *int `json:"shots_total"`
	OnGoal *int `json:"shots_on_goal"`
}

Shots explains shot stat data for a player.

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 Sport

type Sport struct {
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Current bool   `json:"current"`
}

Sport provides sport data.

type Sports

type Sports []struct {
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Current bool   `json:"current"`
}

Sports struct.

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.

func (*Stage) Fixtures

func (s *Stage) Fixtures() []Fixture

Fixtures returns fixture data.

func (*Stage) League

func (s *Stage) League() *League

League returns league data.

func (*Stage) Results

func (s *Stage) Results() []Fixture

Results returns completed fixture data.

func (*Stage) Season

func (s *Stage) Season() *Season

Season returns a season data.

type StageData added in v0.1.6

type StageData struct {
	Data *Stage `json:"data"`
}

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 TVStation

type TVStation struct {
	FixtureID int    `json:"fixture_id"`
	TVStation string `json:"tvstation"`
}

TVStation provides a struct representation of a TVStation resource.

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

func (t *Team) Coach() *Coach

Coach returns the coach data.

func (*Team) Country

func (t *Team) Country() *Country

Country returns the country data.

func (*Team) FIFARanking

func (t *Team) FIFARanking() *Ranking

FIFARanking returns the current FIFA ranking.

func (*Team) GoalScorers

func (t *Team) GoalScorers() []GoalScorer

GoalScorers returns goal scorer data.

func (*Team) LatestResults

func (t *Team) LatestResults() []Fixture

LatestResults returns the latest completed fixture information.

func (*Team) League

func (t *Team) League() *League

League returns the current league data.

func (*Team) LocalFixtures

func (t *Team) LocalFixtures() []Fixture

LocalFixtures returns all fixture data.

func (*Team) Sidelined

func (t *Team) Sidelined() []Sidelined

Sidelined returns player data for injured players.

func (*Team) Squad

func (t *Team) Squad() []SquadPlayer

Squad returns current squad data.

func (*Team) Stats

func (t *Team) Stats() *TeamSeasonStats

Stats returns the aggregated team stats for the current season

func (*Team) Transfers

func (t *Team) Transfers() []Transfer

Transfers returns the teams transfer activity

func (*Team) UEFARanking

func (t *Team) UEFARanking() *Ranking

UEFARanking returns the current UEFA ranking.

func (*Team) UpcomingFixtures

func (t *Team) UpcomingFixtures() []Fixture

UpcomingFixtures returns all upcoming fixture data.

func (*Team) Venue

func (t *Team) Venue() *Venue

Venue returns venue data.

func (*Team) VisitorFixtures

func (t *Team) VisitorFixtures() []Fixture

VisitorFixtures returns all upcoming fixture data for the opposition team.

func (*Team) VisitorResults

func (t *Team) VisitorResults() []Fixture

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 TeamData added in v0.1.6

type TeamData struct {
	Data *Team `json:"data"`
}

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 VenueData added in v0.1.6

type VenueData struct {
	Data *Venue `json:"data"`
}

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.

Jump to

Keyboard shortcuts

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