-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
125 lines (110 loc) · 3.8 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package football
type Season struct {
ID int `json:"id,omitempty"`
StartDate string `json:"startDate,omitempty"`
EndDate string `json:"endDate,omitempty"`
CurrentMatchday int `json:"currentMatchday,omitempty"`
Winner Winner `json:"winner,omitempty"`
AvailableStages []string `json:"availableStages,omitempty"`
}
type Standing struct {
Stage string `json:"stage,omitempty"`
Type string `json:"type,omitempty"`
Group interface{} `json:"group,omitempty"`
Table []Table `json:"table,omitempty"`
}
type StandingType string
const (
StandingTypeTotal StandingType = "TOTAL"
StandingTypeHome StandingType = "HOME"
StandingTypeAway StandingType = "AWAY"
)
type Status string
const (
StatusScheduled Status = "SCHEDULED"
StatusLive Status = "LIVE"
StatusInPlay Status = "IN_PLAY"
StatusPaused Status = "PAUSED"
StatusFinished Status = "FINISHED"
StatusPostPoned Status = "POSTPONED"
StatusSuspended Status = "SUSPENDED"
StatusCanceled Status = "CANCELED"
)
type Scorer struct {
Player Player `json:"player,omitempty"`
Team Team `json:"team,omitempty"`
NumberOfGoals int `json:"numberOfGoals,omitempty"`
}
type Table struct {
Position int `json:"position,omitempty"`
Team Team `json:"team,omitempty"`
PlayedGames int `json:"playedGames,omitempty"`
Won int `json:"won,omitempty"`
Draw int `json:"draw,omitempty"`
Lost int `json:"lost,omitempty"`
Points int `json:"points,omitempty"`
GoalsFor int `json:"goalsFor,omitempty"`
GoalsAgainst int `json:"goalsAgainst,omitempty"`
GoalDifference int `json:"goalDifference,omitempty"`
}
type Winner struct {
ID int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ShortName string `json:"shortName,omitempty"`
TLa string `json:"tla,omitempty"`
CrestURL string `json:"crestUrl,omitempty"`
}
type Coach struct {
ID int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
CountryOfBirth string `json:"countryOfBirth,omitempty"`
Nationality string `json:"nationality,omitempty"`
}
type Time struct {
HomeTeam int `json:"homeTeam,omitempty"`
AwayTeam int `json:"awayTeam,omitempty"`
}
type Score struct {
Winner string `json:"winner,omitempty"`
Duration string `json:"duration,omitempty"`
FullTime Time `json:"fullTime,omitempty"`
HalfTime Time `json:"halfTime,omitempty"`
ExtraTime Time `json:"extraTime,omitempty"`
Penalties Time `json:"penalties,omitempty"`
}
type Goals struct {
Minute int `json:"minute,omitempty"`
ExtraTime interface{} `json:"extraTime,omitempty"`
Type string `json:"type,omitempty"`
Team Team `json:"team,omitempty"`
Scorer Player `json:"scorer,omitempty"`
Assist Player `json:"assist,omitempty"`
}
type Bookings struct {
Minute int `json:"minute,omitempty"`
Team Team `json:"team,omitempty"`
Player Player `json:"player,omitempty"`
Card string `json:"card,omitempty"`
}
type Substitutions struct {
Minute int `json:"minute,omitempty"`
Team Team `json:"team,omitempty"`
PlayerOut Player `json:"playerOut,omitempty"`
PlayerIn Player `json:"playerIn,omitempty"`
}
type Referees struct {
ID int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Nationality interface{} `json:"nationality,omitempty"`
}
type Head2Head struct {
NumberOfMatches int `json:"numberOfMatches,omitempty"`
TotalGoals int `json:"totalGoals,omitempty"`
HomeTeam TeamStats `json:"homeTeam,omitempty"`
AwayTeam TeamStats `json:"awayTeam,omitempty"`
}
type TeamStats struct {
Wins int `json:"wins,omitempty"`
Draws int `json:"draws,omitempty"`
Losses int `json:"losses,omitempty"`
}