Documentation
¶
Index ¶
- type BallPossession
- type Booking
- type Client
- func (c *Client) GetCompetition(options *GetCompetitionsOptions) (*Competition, error)
- func (c *Client) GetCompetitions() ([]Competition, error)
- func (c *Client) GetCurrentMatches() ([]LiveMatch, error)
- func (c *Client) GetMatchEvents(options *GetMatchEventOptions) (TimelineResponse, error)
- func (c *Client) GetMatches(opts *GetMatchesOptions) ([]MatchData, error)
- func (c *Client) GetPlayer(options *GetPlayerOptions) (*PlayerResponse, error)
- func (c *Client) GetSeason(options *GetSeasonOptions) (*SeasonResponse, error)
- func (c *Client) GetTeam(opts *GetTeamOptions) (*TeamResponse, error)
- func (c *Client) SearchCompetition(opts *SearchOptions) (*SearchCompetitionResponse, error)
- func (c *Client) SearchPlayer(opts *SearchOptions) (*SearchPlayerResponse, error)
- func (c *Client) SearchTeam(opts *SearchOptions) (*SearchTeamResponse, error)
- type CoachRole
- type Competition
- type CompetitionsResponse
- type Gender
- type GetCompetitionsOptions
- type GetMatchEventOptions
- type GetMatchesOptions
- type GetPlayerOptions
- type GetSeasonOptions
- type GetTeamOptions
- type Goal
- type HTTPClient
- type LiveMatch
- type LiveResponse
- type LocaleDescription
- type MatchData
- type MatchEvent
- type MatchesResponse
- type Official
- type OfficialType
- type PaginationResponse
- type Period
- type PlayerResponse
- type Properties
- type SearchCompetitionResponse
- type SearchOptions
- type SearchPlayerResponse
- type SearchTeamResponse
- type SeasonHostTeam
- type SeasonResponse
- type Stadium
- type Team
- type TeamCoach
- type TeamPlayer
- type TeamPlayerPicture
- type TeamResponse
- type TeamSubstitution
- type TimelineEvent
- type TimelineResponse
- type VARNotification
- type Weather
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BallPossession ¶
type BallPossession struct {
Intervals any `json:"Intervals"`
LastX any `json:"LastX"`
OverallHome float32 `json:"OverallHome"`
OverallAway float32 `json:"OverallAway"`
}
BallPossession represents the information about ball possession
type Booking ¶
type Booking struct {
Card int `json:"Card"`
Period Period `json:"Period"`
EventId string `json:"IdEvent"`
EventNumber string `json:"EventNumber"`
PlayerId string `json:"IdPlayer"`
CoachId string `json:"IdCoach"`
TeamId string `json:"IdTeam"`
Minute string `json:"Minute"`
Reason string `json:"Reason"`
}
Booking represents the structure of a booking
type Client ¶
type Client struct {
Client HTTPClient
ApiBaseURL string
UserAgent string
Language string
}
func (*Client) GetCompetition ¶
func (c *Client) GetCompetition(options *GetCompetitionsOptions) (*Competition, error)
GetCompetition returns the information about a competition
func (*Client) GetCompetitions ¶
func (c *Client) GetCompetitions() ([]Competition, error)
GetCompetitions returns the list of competitions
func (*Client) GetCurrentMatches ¶
GetCurrentMatches returns the list of active matches
func (*Client) GetMatchEvents ¶
func (c *Client) GetMatchEvents(options *GetMatchEventOptions) (TimelineResponse, error)
GetMatchEvents returns the events from a match
func (*Client) GetMatches ¶
func (c *Client) GetMatches(opts *GetMatchesOptions) ([]MatchData, error)
GetMatches returns the information about queried matches
func (*Client) GetPlayer ¶
func (c *Client) GetPlayer(options *GetPlayerOptions) (*PlayerResponse, error)
GetPlayer returns information about a player
func (*Client) GetSeason ¶
func (c *Client) GetSeason(options *GetSeasonOptions) (*SeasonResponse, error)
GetSeason returns information about a season
func (*Client) GetTeam ¶
func (c *Client) GetTeam(opts *GetTeamOptions) (*TeamResponse, error)
GetTeam returns information about the provided team
func (*Client) SearchCompetition ¶ added in v0.2.0
func (c *Client) SearchCompetition(opts *SearchOptions) (*SearchCompetitionResponse, error)
SearchCompetition searches for a player based on the provided name
func (*Client) SearchPlayer ¶ added in v0.2.0
func (c *Client) SearchPlayer(opts *SearchOptions) (*SearchPlayerResponse, error)
SearchPlayer searches for a player based on the provided name
func (*Client) SearchTeam ¶ added in v0.2.0
func (c *Client) SearchTeam(opts *SearchOptions) (*SearchTeamResponse, error)
SearchTeam searches for a team based on the provided name
type Competition ¶
type Competition struct {
Id string `json:"IdCompetition"`
Name []LocaleDescription `json:"Name"`
ConfederationIds []string `json:"IdConfederation"`
MemberAssociationIds []string `json:"IdMemberAssociation"`
OwnerId string `json:"IdOwner"`
Gender Gender `json:"Gender"`
FootballType int `json:"FootballType"` // TODO: Enum
TeamType int `json:"TeamType"` // TODO: Enum
Type int `json:"CompetitionType"` // TODO: Enum
AgeType int `json:"AgeType"` // TODO: Enum
Properties Properties `json:"Properties"`
IsUpdateable bool `json:"IsUpdateable"`
}
Competition represents the structure of a competition
type CompetitionsResponse ¶
type CompetitionsResponse struct {
PaginationResponse
Results []Competition `json:"Results"`
}
CompetitionsResponse represents the response from the competitions API
type GetCompetitionsOptions ¶
type GetCompetitionsOptions struct {
CompetitionId string
}
GetCompetitionsResponse represents the input used when looking up a competition
type GetMatchEventOptions ¶
type GetMatchEventOptions struct {
CompetitionId string
SeasonId string
StageId string
MatchId string
}
GetMatchEventOptions represents the inputs used to get data about matches
type GetMatchesOptions ¶
type GetMatchesOptions struct {
From time.Time `url:"from,omitempty"`
To time.Time `url:"to,omitempty"`
Count int `url:"Count,omitempty"`
TeamId string `url:"IdTeam,omitempty"`
SeasonId string `url:"IdSeason,omitempty"`
CompetitionId string `url:"IdCompetition,omitempty"`
MatchId string `url:"IdMatch,omitempty"`
StageId string `url:"IdSeason,omitempty"`
}
GetMatchesOptions represents the inputs when looking up matches
type GetPlayerOptions ¶
type GetPlayerOptions struct {
PlayerId string
}
GetPlayerOptions represents the inputs when looking up a player
type GetSeasonOptions ¶
type GetSeasonOptions struct {
SeasonId string
}
GetSeasonOptions represents the inputs when looking up a season
type GetTeamOptions ¶
type GetTeamOptions struct {
TeamId string
}
GetTeamOptions represents the inputs when looking up a team
type Goal ¶
type Goal struct {
Id string `json:"IdGoal"`
TeamId string `json:"IdTeam"`
Type int `json:"Type"` // TODO: Enum
PlayerId string `json:"IdPlayer"`
Minute string `json:"Minute"`
AssistPlayerId string `json:"IdAssistPlayer"`
Period Period `json:"Period"`
}
Goal represents the structure of a goal
type LiveMatch ¶
type LiveMatch struct {
MatchId string `json:"IdMatch"`
StageId string `json:"IdStage"`
GroupId string `json:"IdGroup"`
SeasonId string `json:"IdSeason"`
CompetitionId string `json:"IdCompetition"`
CompetitionName []LocaleDescription `json:"CompetitionName"`
SeasonName []LocaleDescription `json:"SeasonName"`
SeasonShortName any `json:"SeasonShortName"`
Stadium Stadium `json:"Stadium"`
ResultType int `json:"ResultType"` // TODO: Enum
MatchDay string `json:"MatchDay"`
HomeTeamPenaltyScore int `json:"HomeTeamPenaltyScore"`
AwayTeamPenaltyScore int `json:"AwayTeamPenaltyScore"`
AggregateHomeTeamScore any `json:"AggregateHomeTeamScore"`
AggregateAwayTeamScore any `json:"AggregateAwayTeamScore"`
Weather Weather `json:"Weather"`
Attendance any `json:"Attendance"`
Date time.Time `json:"Date"`
LocalDate time.Time `json:"LocalDate"`
MatchTime string `json:"MatchTime"`
SecondHalfTime any `json:"SecondHalfTime"`
FirstHalfTime any `json:"FirstHalfTime"`
FirstHalfExtraTime int `json:"FirstHalfExtraTime"`
SecondHalfExtraTime int `json:"SecondHalfExtraTime"`
Winner any `json:"Winner"`
Period Period `json:"Period"`
HomeTeam Team `json:"HomeTeam"`
AwayTeam Team `json:"AwayTeam"`
BallPossession BallPossession `json:"BallPossession"`
TerritorialPossesion any `json:"TerritorialPossesion"`
TerritorialThirdPossesion any `json:"TerritorialThirdPossesion"`
Officials []Official `json:"Officials"`
MatchStatus int `json:"MatchStatus"` // TODO: Enum
GroupName []LocaleDescription `json:"GroupName"`
StageName []LocaleDescription `json:"StageName"`
OfficialityStatus int `json:"OfficialityStatus"` // TODO: Enum
TimeDefined bool `json:"TimeDefined"`
Properties Properties `json:"Properties"`
IsUpdateable bool `json:"IsUpdateable"`
}
LiveMatch represents the structure of a live match from the "now" api
type LiveResponse ¶
type LiveResponse struct {
PaginationResponse
Results []LiveMatch `json:"Results"`
}
LiveResponse represents the structure of a response from the "now" api
type LocaleDescription ¶
type LocaleDescription struct {
Locale string `json:"Locale"`
Description string `json:"Description"`
}
LocaleDescription represents a common usage for specifying locale information for different nested structures
type MatchData ¶
type MatchData struct {
CompetitionId string `json:"IdCompetition"`
SeasonId string `json:"IdSeason"`
StageId string `json:"IdStage"`
GroupId string `json:"IdGroup"`
Weather Weather `json:"Weather"`
Attendance string `json:"Attendance"`
Id string `json:"IdMatch"`
MatchDay string `json:"MatchDay"`
StageName []LocaleDescription `json:"StageName"`
GroupName []LocaleDescription `json:"GroupName"`
CompetitionName []LocaleDescription `json:"CompetitionName"`
SeasonName []LocaleDescription `json:"SeasonName"`
SeasonShortName any `json:"SeasonShortName"`
Date time.Time `json:"Date"`
LocalDate time.Time `json:"LocalDate"`
Home Team `json:"Home"`
Away Team `json:"Away"`
HomeTeamScore int `json:"HomeTeamScore"`
AwayTeamScore int `json:"AwayTeamScore"`
AggregateHomeTeamScore any `json:"AggregateHomeTeamScore"`
AggregateAwayTeamScore any `json:"AggregateAwayTeamScore"`
HomeTeamPenaltyScore int `json:"HomeTeamPenaltyScore"`
AwayTeamPenaltyScore int `json:"AwayTeamPenaltyScore"`
LastPeriodicUpdate any `json:"LastPeriodicUpdate"`
Leg any `json:"Leg"`
IsHomeMatch bool `json:"IsHomeMatch"`
Stadium Stadium `json:"Stadium"`
IsTicketSalesAllowed bool `json:"IsTicketSalesAllowed"`
MatchTime string `json:"MatchTime"`
SecondHalfTime any `json:"SecondHalfTime"`
FirstHalfTime any `json:"FirstHalfTime"`
FirstHalfExtraTime int `json:"FirstHalfExtraTime"`
SecondHalfExtraTime int `json:"SecondHalfExtraTime"`
Winner string `json:"Winner"`
MatchReportUrl any `json:"MatchReportUrl"`
PlaceholderA string `json:"PlaceHolderA"`
PlaceholderB string `json:"PlaceHolderB"`
BallPossession BallPossession `json:"BallPossession"`
Officials []Official `json:"Officials"`
MatchStatus int `json:"MatchStatus"` // TODO: Enum
ResultType int `json:"ResultType"` // TODO: Enum
MatchNumber int `json:"MatchNumber"`
TimeDefined bool `json:"TimeDefined"`
OfficialityStatus int `json:"OfficialityStatus"` // TODO: Enum
MatchLegInfo any `json:"MatchLegInfo"`
Properties Properties `json:"Properties"`
IsUpdateable bool `json:"IsUpdateable"`
}
MatchData represents the structure of a match object
type MatchEvent ¶
type MatchEvent int // Represents the type of event that occured
const ( GoalScore MatchEvent = 0 // A player scored a goal Assist MatchEvent = 1 // A player assisted a goal YellowCard MatchEvent = 2 // A player was given a yellow card RedCard MatchEvent = 3 // A player was given a red card DoubleYellow MatchEvent = 4 // A player was given a second yellow card Substitution MatchEvent = 5 // A player was substituded out PenaltyAwarded MatchEvent = 6 // A penalty was awarded MatchStart MatchEvent = 7 // The match has started HalfEnd MatchEvent = 8 // The half is over MatchPaused MatchEvent = 9 // The referee paused the match MatchResumed MatchEvent = 10 // The match has resumed GoalAttempt MatchEvent = 12 // A player made an attempt on goal FoulUnknown MatchEvent = 14 // Unknown event type Offside MatchEvent = 15 // A player was deemed offside CornerKick MatchEvent = 16 // Referee awarded a corner kick ShotBlocked MatchEvent = 17 // The goalie blocked a shot Foul MatchEvent = 18 // A player commited a foul CoinToss MatchEvent = 19 // The coin toss happened Unknown3 MatchEvent = 20 // Unknown event type DroppedBall MatchEvent = 23 // The referee called a drop ball ThrowIn MatchEvent = 24 // A player took a throw-in Clearance MatchEvent = 25 // A player cleared the ball MatchEnd MatchEvent = 26 // The match is over Unknown2 MatchEvent = 27 // Unknown event type HitCrossbar MatchEvent = 32 // The player hit the crossbar HitPost MatchEvent = 33 // The player hit the post OwnGoal MatchEvent = 34 // A player scored against their own team HandBall MatchEvent = 37 // The referee called a handball FreeKickGoal MatchEvent = 39 // A player scored a goal from a free-kick PenaltyGoal MatchEvent = 41 // A player scored a goal from a penalty FreeKickCrossbar MatchEvent = 44 // A player hit the crossbar from a free-kick FreeKickPost MatchEvent = 49 // A player hit the post from a free-kick PenaltyMissed MatchEvent = 60 // A player missed their penalty PenaltyMissed2 MatchEvent = 65 // A player missed their penalty?? GoalieSaved MatchEvent = 57 // The goalie stopped the shot VARPenalty MatchEvent = 72 // A penalty was awarded after VAR Pending MatchEvent = 9999 // This event is still pending a final event type, query again for the new event )
type MatchesResponse ¶
type MatchesResponse struct {
PaginationResponse
Results []MatchData `json:"Results"`
}
MatchesResponse represents the information returned from the calendar API
type Official ¶
type Official struct {
Id string `json:"OfficialId"`
CountryId string `json:"IdCountry"`
Name []LocaleDescription `json:"Name"`
ShortName []LocaleDescription `json:"NameShort"`
Type OfficialType `json:"OfficialType"`
TypeLocalized []LocaleDescription `json:"TypeLocalized"`
}
Official represents the information about an offical
type OfficialType ¶ added in v0.1.3
type OfficialType int
const ( Referee OfficialType = 1 AssistantReferee1 OfficialType = 2 AssistantReferee2 OfficialType = 3 FourthOfficial OfficialType = 4 VideoAssistantReferee OfficialType = 5 ReserveReferee OfficialType = 6 OffsideVAR OfficialType = 7 AssistantVAR OfficialType = 8 SupportVAR OfficialType = 9 ReserveAssistantReferee OfficialType = 10 )
type PaginationResponse ¶
type Period ¶
type Period int
Represents the period of play
const ( NotStarted Period = 0 // The first period hasn't started yet FirstPeriod Period = 3 // First period HalfTime Period = 4 // Half Time SecondPeriod Period = 5 // Second period FirstExtraPeriod Period = 7 // First extra period SecondExtraPeriod Period = 9 // Second extra period MatchOver Period = 10 // The match is over ShootoutPeriod Period = 11 // Shootout )
type PlayerResponse ¶
type PlayerResponse struct {
Id string `json:"IdPlayer"`
Name []LocaleDescription `json:"Name"`
Alias []LocaleDescription `json:"Alias"`
Weight float64 `json:"Weight"`
Height float64 `json:"Height"`
Birthplace string `json:"BirthPlace"`
CountryId string `json:"IdCountry"`
InternationalCaps int `json:"InternationalCaps"`
InternationalDebut any `json:"InternationalDebut"`
TopCompetitionDebut any `json:"TopCompetitionDebut"`
PictureUrl string `json:"PictureUrl"`
ThumbnailUrl string `json:"ThumbnailUrl"`
TwitterAccount any `json:"TwitterAccount"`
PreferredFoot any `json:"PreferredFoot"`
MediaContent any `json:"MediaContent"`
LocalizedTwitterAccounts any `json:"LocalizedTwitterAccounts"`
Goals int `json:"Goals"`
PlayerPicture any `json:"PlayerPicture"`
Properties Properties `json:"Properties"`
IsUpdateable bool `json:"IsUpdateable"`
}
PlayerResponse represents the structure of a player from the API
type Properties ¶
type Properties struct {
IdIFES string `json:"IdIFES,omitempty"`
StatsPerformIfesId string `json:"StatsPerformIfesId,omitempty"`
IdStatsPerform string `json:"IdStatsPerform,omitempty"`
Providers string `json:"Providers,omitempty"`
}
Properties represents the properties that can be attached to many objects
type SearchCompetitionResponse ¶ added in v0.2.0
type SearchCompetitionResponse struct {
PaginationResponse
Results []Competition `json:"Results"`
}
SearchCompetitionResponse represents the response from the search API when searching for a competition
type SearchOptions ¶ added in v0.2.0
type SearchOptions struct {
Name string
}
type SearchPlayerResponse ¶ added in v0.2.0
type SearchPlayerResponse struct {
PaginationResponse
Results []PlayerResponse `json:"Results"`
}
SearchPlayerResponse represents the response from the search API when searching for a player
type SearchTeamResponse ¶ added in v0.2.0
type SearchTeamResponse struct {
PaginationResponse
Results []TeamResponse `json:"Results"`
}
SearchTeamResponse represents the response from the search API when searching for a team
type SeasonHostTeam ¶
type SeasonHostTeam struct {
TeamId string `json:"IdTeam"`
}
HostTeam represents the structure of a host team
type SeasonResponse ¶
type SeasonResponse struct {
Id string `json:"IdSeason"`
Name []LocaleDescription `json:"Name"`
ShortName []string `json:"ShortName"`
Abbreviation string `json:"Abbreviation"`
MemberAssociationIds []string `json:"IdMemberAssociation"`
ConfederationIds []string `json:"IdConfederation"`
CompetitionId string `json:"IdCompetition"`
StartDate time.Time `json:"StartDate"`
EndDate time.Time `json:"EndDate"`
PictureUrl string `json:"PictureUrl"`
MascotPictureUrl string `json:"MascotPictureUrl"`
MatchBallPictureUrl string `json:"MatchBallPictureUrl"`
HostTeams []SeasonHostTeam `json:"HostTeams"`
SportType int `json:"SportType"`
Properties Properties `json:"Properties"`
IsUpdateable bool `json:"IsUpdateable"`
}
SeasonResponse represents the structure returned from the Seasons API
type Stadium ¶
type Stadium struct {
Id string `json:"IdStadium"`
Name []LocaleDescription `json:"Name"`
Capacity int `json:"Capacity"`
WebAddress string `json:"WebAddress"`
Built time.Time `json:"Built"`
HasRoof bool `json:"Roof"`
Turf any `json:"Turf"`
CityId string `json:"IdCity"`
CityName []LocaleDescription `json:"CityName"`
CountryId string `json:"IdCountry"`
PostalCode string `json:"PostalCode"`
Street string `json:"Street"`
Email any `json:"Email"`
Fax any `json:"Fax"`
Phone any `json:"Phone"`
AffiliationCountry any `json:"AffiliationCountry"`
AffiliationRegion any `json:"AffiliationRegion"`
Latitude float64 `json:"Latitude"`
Longitude float64 `json:"Longitude"`
Length any `json:"Length"`
Width any `json:"Width"`
Properties Properties `json:"Properties"`
IsUpdateable bool `json:"IsUpdateable"`
}
Stadium represents the structure of a stadium
type Team ¶
type Team struct {
Score int `json:"Score"`
Side any `json:"Side"`
Id string `json:"IdTeam"`
PictureUrl string `json:"PictureUrl"`
CountryId string `json:"IdCountry"`
Type int `json:"TeamType"` // TODO: Enum
AgeType int `json:"AgeType"` // TODO: Enum
Tactics string `json:"Tactics"`
Name []LocaleDescription `json:"TeamName"`
Abbreviation string `json:"Abbreviation"`
Coaches []TeamCoach `json:"Coaches"`
Players []TeamPlayer `json:"Players"`
Bookings []Booking `json:"Bookings"`
Goals []Goal `json:"Goals"`
Substitutions []TeamSubstitution `json:"Substitutions"`
FootballType int `json:"FootballType"` // TODO: Enum
Gender Gender `json:"Gender"`
AssociationId string `json:"IdAssociation"`
ShortClubName string `json:"ShortClubName"`
}
Team represents the structure of a team object
type TeamCoach ¶
type TeamCoach struct {
Id string `json:"IdCoach"`
CountryId string `json:"IdCountry"`
PictureUrl string `json:"PictureUrl"`
Name []LocaleDescription `json:"Name"`
Alias []LocaleDescription `json:"Alias"`
Role CoachRole `json:"Role"`
SpecialStatus any `json:"SpecialStatus"`
}
TeamCoach represents the structure of a coach object
type TeamPlayer ¶
type TeamPlayer struct {
Id string `json:"IdPlayer"`
TeamId string `json:"IdTeam"`
ShirtNumber int `json:"ShirtNumber"`
Status int `json:"Status"` // TODO: Enum
SpecialStatus int `json:"SpecialStatus"` // TODO: Enum
Captain bool `json:"Captain"`
Name []LocaleDescription `json:"PlayerName"`
ShortName []LocaleDescription `json:"ShortName"`
Position int `json:"Position"` // TODO: Enum
PlayerPicture TeamPlayerPicture `json:"PlayerPicture"`
FieldStatus int `json:"FieldStatus"` // TODO: Enum
LineupX int `json:"LineupX"`
LineupY int `json:"LineupY"`
}
TeamPlayer represents the structure of a player from the teams API
type TeamPlayerPicture ¶ added in v0.1.3
TeamPlayerPicture represents a picture object from the "now" API
type TeamResponse ¶
type TeamResponse struct {
Id string `json:"IdTeam"`
ConfederationId string `json:"IdConfederation"`
Type int `json:"Type"` // TODO: Enum
AgeType int `json:"AgeType"` // TODO: Enum
FootballType int `json:"FootballType"` // TODO: Enum
Gender Gender `json:"Gender"` // TODO: Enum
Name []LocaleDescription `json:"Name"`
AssociationId string `json:"IdAssociation"`
CityId string `json:"IdCity"`
Headquarters any `json:"Headquarters"`
TrainingCenter any `json:"TrainingCentre"`
OfficialSite any `json:"OfficialSite"`
City string `json:"City"`
CountryId string `json:"IdCountry"`
PostalCode string `json:"PostalCode"`
RegionName any `json:"RegionName"`
ShortClubName string `json:"ShortClubName"`
Abbreviation string `json:"Abbreviation"`
Street string `json:"Street"`
FoundationYear int `json:"FoundationYear"`
Stadium any `json:"Stadium"`
PictureUrl string `json:"PictureUrl"`
DisplayName []LocaleDescription `json:"DisplayName"`
Content any `json:"Content"`
Properties Properties `json:"Properties"`
IsUpdateable bool `json:"IsUpdateable"`
}
TeamResponse represents the structure returned from the teams API
type TeamSubstitution ¶
type TeamSubstitution struct {
EventId string `json:"IdEvent"`
Period Period `json:"Period"`
Reason int `json:"Reason"` // TODO: Enum
Position int `json:"SubstitutePosition"` // TODO: Enum
PlayerOffId string `json:"IdPlayerOff"`
PlayerOnId string `json:"IdPlayerOn"`
PlayerOffName []LocaleDescription `json:"PlayerOffName"`
PlayerOnName []LocaleDescription `json:"PlayerOnName"`
Minute string `json:"Minute"`
TeamId string `json:"IdTeam"`
}
TeamSubstitution represents the information about a substitution
type TimelineEvent ¶
type TimelineEvent struct {
Id string `json:"EventId"`
TeamId string `json:"IdTeam"`
Timestamp time.Time `json:"Timestamp"`
MatchMinute string `json:"MatchMinute"`
Period Period `json:"Period"`
HomeGoals int `json:"HomeGoals"`
AwayGoals int `json:"AwayGoals"`
Type MatchEvent `json:"Type"`
Qualifiers any `json:"Qualifiers"`
TypeLocalized []LocaleDescription `json:"TypeLocalized"`
HomePenaltyGoals int `json:"HomePenaltyGoals"`
AwayPenaltyGoals int `json:"AwayPenaltyGoals"`
Description []LocaleDescription `json:"EventDescription"`
VarNotificationData VARNotification `json:"VarNotificationData"`
}
TimelineEvent represent the structure of a timeline event
type TimelineResponse ¶
type TimelineResponse struct {
StageId string `json:"IdStage"`
MatchId string `json:"IdMatch"`
CompetitionId string `json:"IdCompetition"`
SeasonId string `json:"IdSeason"`
GroupId string `json:"IdGroup"`
Events []TimelineEvent `json:"Event"`
}
TimelineResponse represents the response from the timeline API