sports_api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +39 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +310 -0
- data/Rakefile +12 -0
- data/docs/.nojekyll +0 -0
- data/docs/README.md +12 -0
- data/docs/_media/favicon.ico +0 -0
- data/docs/_media/home-logo.svg +57 -0
- data/docs/_media/readme-logo.png +0 -0
- data/docs/_sidebar.md +42 -0
- data/docs/cover.md +2 -0
- data/docs/index.html +44 -0
- data/docs/installation.md +17 -0
- data/docs/resources.md +932 -0
- data/docs/usage.md +13 -0
- data/lib/sports_api/collection.rb +30 -0
- data/lib/sports_api/error.rb +5 -0
- data/lib/sports_api/football/client.rb +180 -0
- data/lib/sports_api/football/objects/coach.rb +8 -0
- data/lib/sports_api/football/objects/country.rb +8 -0
- data/lib/sports_api/football/objects/fixtures/fixture.rb +8 -0
- data/lib/sports_api/football/objects/fixtures/fixture_event.rb +8 -0
- data/lib/sports_api/football/objects/fixtures/fixture_head_to_head.rb +8 -0
- data/lib/sports_api/football/objects/fixtures/fixture_lineup.rb +8 -0
- data/lib/sports_api/football/objects/fixtures/fixture_player_statistic.rb +8 -0
- data/lib/sports_api/football/objects/fixtures/fixture_round.rb +8 -0
- data/lib/sports_api/football/objects/fixtures/fixture_statistic.rb +8 -0
- data/lib/sports_api/football/objects/injury.rb +8 -0
- data/lib/sports_api/football/objects/leagues/league.rb +8 -0
- data/lib/sports_api/football/objects/leagues/league_season.rb +8 -0
- data/lib/sports_api/football/objects/odds_in_play/odds_live.rb +8 -0
- data/lib/sports_api/football/objects/odds_in_play/odds_live_bet.rb +8 -0
- data/lib/sports_api/football/objects/odds_pre_match/odds.rb +8 -0
- data/lib/sports_api/football/objects/odds_pre_match/odds_bet.rb +8 -0
- data/lib/sports_api/football/objects/odds_pre_match/odds_bookmaker.rb +8 -0
- data/lib/sports_api/football/objects/odds_pre_match/odds_mapping.rb +8 -0
- data/lib/sports_api/football/objects/players/player.rb +8 -0
- data/lib/sports_api/football/objects/players/player_season.rb +8 -0
- data/lib/sports_api/football/objects/players/player_squad.rb +8 -0
- data/lib/sports_api/football/objects/players/player_top_assist.rb +8 -0
- data/lib/sports_api/football/objects/players/player_top_red_card.rb +8 -0
- data/lib/sports_api/football/objects/players/player_top_scorer.rb +8 -0
- data/lib/sports_api/football/objects/players/player_top_yellow_card.rb +8 -0
- data/lib/sports_api/football/objects/prediction.rb +8 -0
- data/lib/sports_api/football/objects/sidelined.rb +8 -0
- data/lib/sports_api/football/objects/standing.rb +8 -0
- data/lib/sports_api/football/objects/teams/team.rb +8 -0
- data/lib/sports_api/football/objects/teams/team_country.rb +8 -0
- data/lib/sports_api/football/objects/teams/team_season.rb +8 -0
- data/lib/sports_api/football/objects/teams/team_statistic.rb +8 -0
- data/lib/sports_api/football/objects/timezone.rb +8 -0
- data/lib/sports_api/football/objects/transfer.rb +8 -0
- data/lib/sports_api/football/objects/trophy.rb +8 -0
- data/lib/sports_api/football/objects/venue.rb +8 -0
- data/lib/sports_api/football/resources/coach.rb +21 -0
- data/lib/sports_api/football/resources/country.rb +26 -0
- data/lib/sports_api/football/resources/fixtures/fixture.rb +32 -0
- data/lib/sports_api/football/resources/fixtures/fixture_event.rb +17 -0
- data/lib/sports_api/football/resources/fixtures/fixture_head_to_head.rb +24 -0
- data/lib/sports_api/football/resources/fixtures/fixture_lineup.rb +17 -0
- data/lib/sports_api/football/resources/fixtures/fixture_player_statistic.rb +15 -0
- data/lib/sports_api/football/resources/fixtures/fixture_round.rb +16 -0
- data/lib/sports_api/football/resources/fixtures/fixture_statistic.rb +16 -0
- data/lib/sports_api/football/resources/injury.rb +21 -0
- data/lib/sports_api/football/resources/leagues/league.rb +27 -0
- data/lib/sports_api/football/resources/leagues/league_season.rb +12 -0
- data/lib/sports_api/football/resources/odds_in_play/odds_live.rb +16 -0
- data/lib/sports_api/football/resources/odds_in_play/odds_live_bet.rb +20 -0
- data/lib/sports_api/football/resources/odds_pre_match/odds.rb +21 -0
- data/lib/sports_api/football/resources/odds_pre_match/odds_bet.rb +20 -0
- data/lib/sports_api/football/resources/odds_pre_match/odds_bookmaker.rb +20 -0
- data/lib/sports_api/football/resources/odds_pre_match/odds_mapping.rb +14 -0
- data/lib/sports_api/football/resources/players/player.rb +20 -0
- data/lib/sports_api/football/resources/players/player_season.rb +14 -0
- data/lib/sports_api/football/resources/players/player_squad.rb +15 -0
- data/lib/sports_api/football/resources/players/player_top_assist.rb +21 -0
- data/lib/sports_api/football/resources/players/player_top_red_card.rb +21 -0
- data/lib/sports_api/football/resources/players/player_top_scorer.rb +21 -0
- data/lib/sports_api/football/resources/players/player_top_yellow_card.rb +21 -0
- data/lib/sports_api/football/resources/prediction.rb +14 -0
- data/lib/sports_api/football/resources/sidelined.rb +15 -0
- data/lib/sports_api/football/resources/standing.rb +16 -0
- data/lib/sports_api/football/resources/teams/team.rb +26 -0
- data/lib/sports_api/football/resources/teams/team_country.rb +12 -0
- data/lib/sports_api/football/resources/teams/team_season.rb +14 -0
- data/lib/sports_api/football/resources/teams/team_statistic.rb +24 -0
- data/lib/sports_api/football/resources/timezone.rb +12 -0
- data/lib/sports_api/football/resources/transfer.rb +15 -0
- data/lib/sports_api/football/resources/trophy.rb +15 -0
- data/lib/sports_api/football/resources/venue.rb +23 -0
- data/lib/sports_api/football.rb +84 -0
- data/lib/sports_api/object.rb +35 -0
- data/lib/sports_api/resource.rb +32 -0
- data/lib/sports_api/version.rb +5 -0
- data/lib/sports_api.rb +8 -0
- data/sig/sports_api.rbs +4 -0
- data/sports_api.gemspec +40 -0
- metadata +175 -0
data/docs/resources.md
ADDED
@@ -0,0 +1,932 @@
|
|
1
|
+
# Resources <!-- {docsify-ignore} -->
|
2
|
+
|
3
|
+
The gem maps as closely as we can to the Sports API so you can easily convert API examples to gem code.
|
4
|
+
|
5
|
+
Responses are created as objects like `SportsApi::Football::League`. They're built using OpenStruct so you can easily access data in a Ruby-ish way.
|
6
|
+
|
7
|
+
## Football <!-- {docsify-ignore} -->
|
8
|
+
|
9
|
+
### Coach
|
10
|
+
|
11
|
+
Obtain comprehensive details about the coaches and their professional trajectories.
|
12
|
+
|
13
|
+
**Query Parameters**
|
14
|
+
|
15
|
+
| Parameter | Type | Required | Description |
|
16
|
+
|-----------|----------|----------|------------------------------------------|
|
17
|
+
| id | Integer | - | The coach ID. |
|
18
|
+
| team | Integer | - | The team ID. |
|
19
|
+
| search | String | - | The name of the coach [>= 3 characters]. |
|
20
|
+
|
21
|
+
**Examples**
|
22
|
+
|
23
|
+
_List coaches by team_
|
24
|
+
```ruby
|
25
|
+
client.coaches.list(team: 2287)
|
26
|
+
```
|
27
|
+
|
28
|
+
_Search coaches by name_
|
29
|
+
```ruby
|
30
|
+
client.coaches.list(search: 'Tuchel')
|
31
|
+
```
|
32
|
+
|
33
|
+
_Find a single coach by ID_
|
34
|
+
```ruby
|
35
|
+
client.coaches.find(id: 40)
|
36
|
+
```
|
37
|
+
|
38
|
+
### Country
|
39
|
+
|
40
|
+
Retrieve the roster of countries accessible via the leagues endpoint.
|
41
|
+
All the parameters of this endpoint can be used together.
|
42
|
+
|
43
|
+
**Query Parameters**
|
44
|
+
|
45
|
+
| Parameter | Type | Required | Description |
|
46
|
+
|-----------|----------|----------|------------------------------------------|
|
47
|
+
| name | String | - | The name of the country. |
|
48
|
+
| code | String | - | The country code [2-3 characters]. |
|
49
|
+
| search | String | - | The name of the country [>= 3 characters]. |
|
50
|
+
|
51
|
+
**Examples**
|
52
|
+
|
53
|
+
_Get all the available countries_
|
54
|
+
```ruby
|
55
|
+
client.countries.list
|
56
|
+
```
|
57
|
+
|
58
|
+
_Search countries by name_
|
59
|
+
```ruby
|
60
|
+
client.countries.list(search: "Mex")
|
61
|
+
```
|
62
|
+
|
63
|
+
_Find the first country that matches with the code_
|
64
|
+
```ruby
|
65
|
+
client.countries.find_by_code(code: "MX")
|
66
|
+
```
|
67
|
+
|
68
|
+
_Find the first country that matches with the name_
|
69
|
+
```ruby
|
70
|
+
client.countries.find_by_name(name: "Mexico")
|
71
|
+
```
|
72
|
+
|
73
|
+
### Fixture
|
74
|
+
|
75
|
+
Retrieve the list of matches.
|
76
|
+
|
77
|
+
**Query Parameters**
|
78
|
+
|
79
|
+
| Parameter | Type | Required | Description |
|
80
|
+
|-----------|----------|----------|------------------------------------------|
|
81
|
+
| id | Integer | - | The fixture ID. |
|
82
|
+
| ids | String | - | One or more fixture IDs ["id-id-id"]. |
|
83
|
+
| live | String | - | All or several leagues ids ["all", "id-id"]. |
|
84
|
+
| date | String | - | The date of the fixture ["YYYY-MM-DD"]. |
|
85
|
+
| league | Integer | - | The league ID. |
|
86
|
+
| season | Integer | - | The season year [YYYY]. |
|
87
|
+
| last | Integer | - | For the X last fixtures [<= 2 characters]. |
|
88
|
+
| next | Integer | - | For the X next fixtures [<= 2 characters]. |
|
89
|
+
| from | String | - | A valid date ["YYYY-MM-DD"]. |
|
90
|
+
| to | String | - | A valid date ["YYYY-MM-DD"]. |
|
91
|
+
| round | String | - | The round of the fixture. |
|
92
|
+
| status | String | - | One or more fixture status short ["NS", "NS-PST-FT", etc.]. |
|
93
|
+
| venue | Integer | - | The venue ID. |
|
94
|
+
| timezone | String | - | A valid timezone from the endpoint `Timezone`. |
|
95
|
+
|
96
|
+
**Examples**
|
97
|
+
|
98
|
+
_Retrieve a list of fixtures_
|
99
|
+
```ruby
|
100
|
+
client.fixtures.list(live: "all", league: 262)
|
101
|
+
```
|
102
|
+
|
103
|
+
_Retrieve a list of fixtures by IDs_
|
104
|
+
```ruby
|
105
|
+
client.fixtures.list(ids: "215662-215663-215664-215665-215666-215667")
|
106
|
+
```
|
107
|
+
|
108
|
+
_Get a single fixture by ID_
|
109
|
+
```ruby
|
110
|
+
client.fixtures.find(id: 1187546)
|
111
|
+
```
|
112
|
+
|
113
|
+
### Fixture Round
|
114
|
+
|
115
|
+
Retrieve the rounds or stages of a league or cup.
|
116
|
+
|
117
|
+
**Query Parameters**
|
118
|
+
|
119
|
+
| Parameter | Type | Required | Description |
|
120
|
+
|-----------|----------|----------|------------------------------------------|
|
121
|
+
| league | Integer | ✅ | The league ID. |
|
122
|
+
| season | Integer | ✅ | The season year of the league [YYYY]. |
|
123
|
+
| current | Boolean | - | The current round ["true", "false"]. |
|
124
|
+
|
125
|
+
**Examples**
|
126
|
+
|
127
|
+
_Retrieve the fixture rounds by league and season_
|
128
|
+
```ruby
|
129
|
+
client.fixture_rounds.list(league: 262, season: 2023)
|
130
|
+
```
|
131
|
+
|
132
|
+
_Retrieve the fixture rounds by league, season and the current one_
|
133
|
+
```ruby
|
134
|
+
client.fixture_rounds.list(league: 262, season: 2023, current: "true")
|
135
|
+
```
|
136
|
+
|
137
|
+
### Fixture Head to Head
|
138
|
+
|
139
|
+
Get heads to heads between two teams.
|
140
|
+
|
141
|
+
**Query Parameters**
|
142
|
+
|
143
|
+
| Parameter | Type | Required | Description |
|
144
|
+
|-----------|----------|----------|------------------------------------------|
|
145
|
+
| h2h | String | ✅ | The ids of the teams ["id-id"]. |
|
146
|
+
| date | String | - | A valid date [YYYY-MM-DD]. |
|
147
|
+
| league | Integer | - | The league ID. |
|
148
|
+
| season | Integer | - | The season year of the league [YYYY]. |
|
149
|
+
| last | Integer | - | For the X last fixtures [<= 2 characters]. |
|
150
|
+
| next | Integer | - | For the X next fixtures [<= 2 characters]. |
|
151
|
+
| from | String | - | A valid date ["YYYY-MM-DD"]. |
|
152
|
+
| to | String | - | A valid date ["YYYY-MM-DD"]. |
|
153
|
+
| status | String | - | One or more fixture status short ["NS", "NS-PST-FT", etc.]. |
|
154
|
+
| venue | Integer | - | The venue ID. |
|
155
|
+
| timezone | String | - | A valid timezone from the endpoint `Timezone`. |
|
156
|
+
|
157
|
+
**Examples**
|
158
|
+
|
159
|
+
_Retrieve head to head data between two teams_
|
160
|
+
```ruby
|
161
|
+
client.fixture_head_to_head.list(h2h: "2287-2278")
|
162
|
+
```
|
163
|
+
|
164
|
+
_Retrieve head to head data between two teams by date_
|
165
|
+
```ruby
|
166
|
+
client.fixture_head_to_head.list(h2h: "2287-2278", date: "2019-10-22")
|
167
|
+
```
|
168
|
+
|
169
|
+
_Retrieve head to head data between two teams in a timezone_
|
170
|
+
```ruby
|
171
|
+
client.fixture_head_to_head.list(h2h: "2287-2278", timezone: "Europe/Londo")
|
172
|
+
```
|
173
|
+
|
174
|
+
### Fixture Statistic
|
175
|
+
|
176
|
+
Retrieve the detailed metrics for a specific match.
|
177
|
+
|
178
|
+
**Query Parameters**
|
179
|
+
|
180
|
+
| Parameter | Type | Required | Description |
|
181
|
+
|-----------|----------|----------|------------------------------------------|
|
182
|
+
| fixture | Integer | ✅ | The fixture ID. |
|
183
|
+
| team | Integer | - | The team ID. |
|
184
|
+
| type | String | - | The type of statistics ["Shots on Goal", "Corner Kicks", etc]. |
|
185
|
+
|
186
|
+
**Examples**
|
187
|
+
|
188
|
+
_Retrieve the statistics for one fixture_
|
189
|
+
```ruby
|
190
|
+
client.fixture_statistics.list(fixture: 215662)
|
191
|
+
```
|
192
|
+
|
193
|
+
_Retrieve the statistics for a fixture, by team and by a type_
|
194
|
+
```ruby
|
195
|
+
client.fixture_statistics.list(fixture: 215662, team: 463, type: "Total Shots")
|
196
|
+
```
|
197
|
+
|
198
|
+
### Fixture Event
|
199
|
+
|
200
|
+
Retrieve the occurrences or incidents associated with a specific match.
|
201
|
+
|
202
|
+
**Query Parameters**
|
203
|
+
|
204
|
+
| Parameter | Type | Required | Description |
|
205
|
+
|-----------|----------|----------|------------------------------------------|
|
206
|
+
| fixture | Integer | ✅ | The fixture ID. |
|
207
|
+
| team | Integer | - | The team ID. |
|
208
|
+
| player | Integer | - | The team ID. |
|
209
|
+
| type | String | - | The type of the event ["Goal", "Card", "Subst", "Var"]. |
|
210
|
+
|
211
|
+
**Examples**
|
212
|
+
|
213
|
+
_Retrieve the events for a fixture_
|
214
|
+
```ruby
|
215
|
+
client.fixture_events.list(fixture: 215662)
|
216
|
+
```
|
217
|
+
|
218
|
+
_Retrieve the card events for a fixture_
|
219
|
+
```ruby
|
220
|
+
client.fixture_events.list(fixture: 215662, type: "card")
|
221
|
+
```
|
222
|
+
|
223
|
+
_Retrieve the events for a fixture by player_
|
224
|
+
```ruby
|
225
|
+
client.fixture_events.list(fixture: 215662, player: 35845)
|
226
|
+
```
|
227
|
+
|
228
|
+
### Fixture Lineup
|
229
|
+
|
230
|
+
Retrieve the player formations for a specific match.
|
231
|
+
|
232
|
+
**Query Parameters**
|
233
|
+
|
234
|
+
| Parameter | Type | Required | Description |
|
235
|
+
|-----------|----------|----------|------------------------------------------|
|
236
|
+
| fixture | Integer | ✅ | The fixture ID. |
|
237
|
+
| team | Integer | - | The team ID. |
|
238
|
+
| player | Integer | - | The team ID. |
|
239
|
+
| type | String | - | The type of the event ["Formation", "Coach", "Start XI", "Substitutes"]. |
|
240
|
+
|
241
|
+
**Examples**
|
242
|
+
|
243
|
+
_Retrive the lineups of a match_
|
244
|
+
```ruby
|
245
|
+
client.fixture_lineups.list(fixture: 592872)
|
246
|
+
```
|
247
|
+
|
248
|
+
_Retrive the lineups of a team in a match_
|
249
|
+
```ruby
|
250
|
+
client.fixture_lineups.list(fixture: 592872, team: 50)
|
251
|
+
```
|
252
|
+
|
253
|
+
_Retrive the lineups of a match by type_
|
254
|
+
```ruby
|
255
|
+
client.fixture_lineups.list(fixture: 592872, type: "startXI")
|
256
|
+
```
|
257
|
+
|
258
|
+
### Fixture Player Statistic
|
259
|
+
|
260
|
+
Retrieve metrics of players from a specific match.
|
261
|
+
|
262
|
+
**Query Parameters**
|
263
|
+
|
264
|
+
| Parameter | Type | Required | Description |
|
265
|
+
|-----------|----------|----------|------------------------------------------|
|
266
|
+
| fixture | Integer | ✅ | The fixture ID. |
|
267
|
+
| team | Integer | - | The team ID. |
|
268
|
+
|
269
|
+
**Examples**
|
270
|
+
|
271
|
+
_Retrieve the players statistics from one fixture_
|
272
|
+
```ruby
|
273
|
+
client.fixture_player_statistics.list(fixture: 169080)
|
274
|
+
```
|
275
|
+
|
276
|
+
_Retrieve the players statistics from one fixture and of a team_
|
277
|
+
```ruby
|
278
|
+
client.fixture_player_statistics.list(fixture: 169080, team: 2284)
|
279
|
+
```
|
280
|
+
|
281
|
+
### Injury
|
282
|
+
|
283
|
+
Retrieve the roster of players who are unavailable for fixtures due to reasons such as suspensions or injuries.
|
284
|
+
|
285
|
+
**Query Parameters**
|
286
|
+
|
287
|
+
| Parameter | Type | Required | Description |
|
288
|
+
|-----------|----------|----------|------------------------------------------|
|
289
|
+
| fixture | Integer | - | The fixture ID. |
|
290
|
+
| team | Integer | - | The team ID. |
|
291
|
+
| league | Integer | - | The league ID. |
|
292
|
+
| player | Integer | - | The player ID. |
|
293
|
+
| season | Integer | - | The season of the league, required with `league`, `team` and `player` parameters [YYYY]. |
|
294
|
+
| date | String | - | A valid date [YYYY-MM-DD]. |
|
295
|
+
| timezone | String | - | A valid timezone from the endpoint `Timezone`. |
|
296
|
+
|
297
|
+
**Examples**
|
298
|
+
|
299
|
+
_Retrieve the injuries of a match_
|
300
|
+
```ruby
|
301
|
+
client.injuries.list(fixture: 686314)
|
302
|
+
```
|
303
|
+
|
304
|
+
_Retrieve the injuries of a match by team and from a season_
|
305
|
+
```ruby
|
306
|
+
client.injuries.list(fixture: 686314, team: 85, season: 2020)
|
307
|
+
```
|
308
|
+
|
309
|
+
### League
|
310
|
+
|
311
|
+
Retrieve the roster of accessible leagues and cups.
|
312
|
+
|
313
|
+
**Query Parameters**
|
314
|
+
|
315
|
+
| Parameter | Type | Required | Description |
|
316
|
+
|-----------|----------|----------|------------------------------------------|
|
317
|
+
| id | Integer | - | The league ID. |
|
318
|
+
| team | Integer | - | The team ID. |
|
319
|
+
| name | String | - | The name of the league. |
|
320
|
+
| country | String | - | The country name of the league. |
|
321
|
+
| code | String | - | The Alpha2 code of the country ["MX", "FR", etc]. |
|
322
|
+
| season | Integer | - | The season of the league [YYYY]. |
|
323
|
+
| type | String | - | The type of the league ["league", "cup"]. |
|
324
|
+
| current | String | - | The state of the league ["true", "false"]. |
|
325
|
+
| search | String | - | The name or the country of the league [>= 3 characters]. |
|
326
|
+
| last | Integer | - | The X last leagues/cups added in the API [<= 2 characters]. |
|
327
|
+
|
328
|
+
**Examples**
|
329
|
+
|
330
|
+
_Retrieve leagues by name_
|
331
|
+
```ruby
|
332
|
+
client.leagues.list(name: "premier league")
|
333
|
+
```
|
334
|
+
|
335
|
+
_Retrieve leagues by country and season_
|
336
|
+
```ruby
|
337
|
+
client.leagues.list(code: "MX", season: 2023)
|
338
|
+
```
|
339
|
+
|
340
|
+
_Get a league by ID_
|
341
|
+
```ruby
|
342
|
+
client.leagues.find(id: 262)
|
343
|
+
```
|
344
|
+
|
345
|
+
_Retrieve all leagues where the season is in progress or not_
|
346
|
+
```ruby
|
347
|
+
client.leagues.list(current: "true")
|
348
|
+
```
|
349
|
+
|
350
|
+
### League Season
|
351
|
+
|
352
|
+
Retrieve the catalog of seasons that are available.
|
353
|
+
|
354
|
+
**Query Parameters**
|
355
|
+
|
356
|
+
| Parameter | Type | Required | Description |
|
357
|
+
|-----------|----------|----------|------------------------------------------|
|
358
|
+
| - | - | - | - |
|
359
|
+
|
360
|
+
**Examples**
|
361
|
+
|
362
|
+
_Retrieve all the available seasons_
|
363
|
+
```ruby
|
364
|
+
client.league_seasons.list
|
365
|
+
```
|
366
|
+
|
367
|
+
### Odds
|
368
|
+
|
369
|
+
Retrieve betting odds associated with fixtures, leagues, or specific dates.
|
370
|
+
|
371
|
+
**Query Parameters**
|
372
|
+
|
373
|
+
| Parameter | Type | Required | Description |
|
374
|
+
|-----------|----------|----------|------------------------------------------|
|
375
|
+
| fixture | Integer | - | The fixture ID. |
|
376
|
+
| league | Integer | - | The league ID. |
|
377
|
+
| bet | Integer | - | The bet ID. |
|
378
|
+
| bookmaker | Integer | - | The bookmaker ID. |
|
379
|
+
| season | Integer | - | The season of the league [YYYY]. |
|
380
|
+
| date | String | - | A valid date [YYYY-MM-DD]. |
|
381
|
+
| timezone | String | - | A valid timezone from the endpoint `Timezone`. |
|
382
|
+
| page | Integer | - | Use for the pagination [default 1]. |
|
383
|
+
|
384
|
+
**Examples**
|
385
|
+
|
386
|
+
_Retrieve all available odds from a match_
|
387
|
+
```ruby
|
388
|
+
client.odds.list(fixture: 164327)
|
389
|
+
```
|
390
|
+
|
391
|
+
_Retrieve all available odds from a match and a bookmaker_
|
392
|
+
```ruby
|
393
|
+
client.odds.list(fixture: 164327, bookmaker: 6)
|
394
|
+
```
|
395
|
+
|
396
|
+
_Retrieve all odds from a date_
|
397
|
+
```ruby
|
398
|
+
client.odds.list(date: "2020-05-15")
|
399
|
+
```
|
400
|
+
|
401
|
+
### Odds Bet
|
402
|
+
|
403
|
+
Retrieve all available bets for pre-match odds.
|
404
|
+
|
405
|
+
**Query Parameters**
|
406
|
+
|
407
|
+
| Parameter | Type | Required | Description |
|
408
|
+
|-----------|----------|----------|------------------------------------------|
|
409
|
+
| id | Integer | - | The bet name ID. |
|
410
|
+
| search | String | - | The name of the bet [>= 3 characters]. |
|
411
|
+
|
412
|
+
**Examples**
|
413
|
+
|
414
|
+
_Retrieve all the available bets by name_
|
415
|
+
```ruby
|
416
|
+
client.odds_bets.list(search: "winner")
|
417
|
+
```
|
418
|
+
|
419
|
+
_Get a bet by ID_
|
420
|
+
```ruby
|
421
|
+
client.odds_bets.find(id: 1)
|
422
|
+
```
|
423
|
+
|
424
|
+
### Odds Bookmaker
|
425
|
+
|
426
|
+
Retrieve the list of all accessible bookmakers.
|
427
|
+
|
428
|
+
**Query Parameters**
|
429
|
+
|
430
|
+
| Parameter | Type | Required | Description |
|
431
|
+
|-----------|----------|----------|------------------------------------------|
|
432
|
+
| id | Integer | - | The bookmaker ID. |
|
433
|
+
| search | String | - | The name of the bookmaker [>= 3 characters]. |
|
434
|
+
|
435
|
+
**Examples**
|
436
|
+
|
437
|
+
_Retrieve all available bookmakers_
|
438
|
+
```ruby
|
439
|
+
client.odds_bookmakers.list
|
440
|
+
```
|
441
|
+
|
442
|
+
_Retrieve bookmakers by name_
|
443
|
+
```ruby
|
444
|
+
client.odds_bookmakers.list(search: "Bet365")
|
445
|
+
```
|
446
|
+
|
447
|
+
_Get a bookmaker by ID_
|
448
|
+
```ruby
|
449
|
+
client.odds_bookmakers.find(id: 8)
|
450
|
+
```
|
451
|
+
|
452
|
+
### Odds Live
|
453
|
+
|
454
|
+
Retrieve in-play betting odds for ongoing matches.
|
455
|
+
|
456
|
+
**Query Parameters**
|
457
|
+
|
458
|
+
| Parameter | Type | Required | Description |
|
459
|
+
|-----------|----------|----------|------------------------------------------|
|
460
|
+
| fixture | Integer | - | The fixture ID. |
|
461
|
+
| league | Integer | - | The league ID. |
|
462
|
+
| bet | Integer | - | The bet ID. |
|
463
|
+
|
464
|
+
**Examples**
|
465
|
+
|
466
|
+
_Retrieve all available in-play odds_
|
467
|
+
```ruby
|
468
|
+
client.odds_lives.list
|
469
|
+
```
|
470
|
+
|
471
|
+
_Retrieve all available in-play odds from a match_
|
472
|
+
```ruby
|
473
|
+
client.odds_lives.list(fixture: 721238)
|
474
|
+
```
|
475
|
+
|
476
|
+
_Retrieve all available in-play odds from a league_
|
477
|
+
```ruby
|
478
|
+
client.odds_lives.list(league: 262)
|
479
|
+
```
|
480
|
+
|
481
|
+
### Odds Live Bet
|
482
|
+
|
483
|
+
Retrieve all available bets for in-play odds.
|
484
|
+
|
485
|
+
**Query Parameters**
|
486
|
+
|
487
|
+
| Parameter | Type | Required | Description |
|
488
|
+
|-----------|----------|----------|------------------------------------------|
|
489
|
+
| id | Integer | - | The bet name ID. |
|
490
|
+
| search | String | - | The name of the bet [>= 3 characters]. |
|
491
|
+
|
492
|
+
**Examples**
|
493
|
+
|
494
|
+
_Retrieve all available bets_
|
495
|
+
```ruby
|
496
|
+
client.odds_live_bets.list
|
497
|
+
```
|
498
|
+
|
499
|
+
_Get a bet by ID_
|
500
|
+
```ruby
|
501
|
+
client.odds_live_bets.find(id: 1)
|
502
|
+
```
|
503
|
+
|
504
|
+
_Retrieve all available bets by name_
|
505
|
+
```ruby
|
506
|
+
client.odds_live_bets.list(search: "winner")
|
507
|
+
```
|
508
|
+
|
509
|
+
### Odds Mapping
|
510
|
+
|
511
|
+
Retrieve the list of available fixtures ID for the endpoint odds.
|
512
|
+
|
513
|
+
**Query Parameters**
|
514
|
+
|
515
|
+
| Parameter | Type | Required | Description |
|
516
|
+
|-----------|----------|----------|------------------------------------------|
|
517
|
+
| page | Integer | - | Use for the pagination [default 1]. |
|
518
|
+
|
519
|
+
**Examples**
|
520
|
+
|
521
|
+
_Retrieve the available fixtures for the odds endpoint_
|
522
|
+
```ruby
|
523
|
+
client.odds_mappings.list
|
524
|
+
```
|
525
|
+
|
526
|
+
### Player
|
527
|
+
|
528
|
+
Retrieve all the player info and statistics.
|
529
|
+
|
530
|
+
**Query Parameters**
|
531
|
+
|
532
|
+
| Parameter | Type | Required | Description |
|
533
|
+
|-----------|----------|----------|------------------------------------------|
|
534
|
+
| id | Integer | - | The player ID. |
|
535
|
+
| team | Integer | - | The team ID. |
|
536
|
+
| league | Integer | - | The league ID. |
|
537
|
+
| season | Integer | - | The season of the league [YYYY]. |
|
538
|
+
| search | String | - | The name of the player [>= 3 characters]. |
|
539
|
+
| page | Integer | - | Use for the pagination [default 1]. |
|
540
|
+
|
541
|
+
**Examples**
|
542
|
+
|
543
|
+
_Retrieve player data from a team and a season_
|
544
|
+
```ruby
|
545
|
+
client.players.list(team: 2287, season: 2023)
|
546
|
+
```
|
547
|
+
|
548
|
+
_Retrieve player data by name and a season_
|
549
|
+
```ruby
|
550
|
+
client.players.list(search: "cavani", season: 2018)
|
551
|
+
```
|
552
|
+
|
553
|
+
### Player Top Assist
|
554
|
+
|
555
|
+
Retrieve the top 20 players with the most assists in a league or cup.
|
556
|
+
|
557
|
+
**Query Parameters**
|
558
|
+
|
559
|
+
| Parameter | Type | Required | Description |
|
560
|
+
|-----------|----------|----------|------------------------------------------|
|
561
|
+
| league | Integer | ✅ | The league ID. |
|
562
|
+
| season | Integer | ✅ | The season of the league [YYYY]. |
|
563
|
+
|
564
|
+
**Examples**
|
565
|
+
|
566
|
+
_Retrieve the 20 best player assists for a specific league and season_
|
567
|
+
```ruby
|
568
|
+
client.player_top_assists.list(league: 262, season: 2023)
|
569
|
+
```
|
570
|
+
|
571
|
+
### Player Top Scorer
|
572
|
+
|
573
|
+
Retrieve the top 20 players with the highest scoring records for a league or cup.
|
574
|
+
|
575
|
+
**Query Parameters**
|
576
|
+
|
577
|
+
| Parameter | Type | Required | Description |
|
578
|
+
|-----------|----------|----------|------------------------------------------|
|
579
|
+
| league | Integer | ✅ | The league ID. |
|
580
|
+
| season | Integer | ✅ | The season of the league [YYYY]. |
|
581
|
+
|
582
|
+
**Examples**
|
583
|
+
|
584
|
+
_Retrieve the 20 best player scorers for a specific league and season_
|
585
|
+
```ruby
|
586
|
+
client.player_top_scorers.list(league: 262, season: 2023)
|
587
|
+
```
|
588
|
+
|
589
|
+
### Player Top Red Card
|
590
|
+
|
591
|
+
Retrieve the top 20 players with the highest number of red cards in a league or cup.
|
592
|
+
|
593
|
+
**Query Parameters**
|
594
|
+
|
595
|
+
| Parameter | Type | Required | Description |
|
596
|
+
|-----------|----------|----------|------------------------------------------|
|
597
|
+
| league | Integer | ✅ | The league ID. |
|
598
|
+
| season | Integer | ✅ | The season of the league [YYYY]. |
|
599
|
+
|
600
|
+
**Examples**
|
601
|
+
|
602
|
+
_Retrieve the 20 players with the highest number of red cards by league and season_
|
603
|
+
```ruby
|
604
|
+
client.player_top_red_cards.list(league: 262, season: 2023)
|
605
|
+
```
|
606
|
+
|
607
|
+
### Player Top Yellow Card
|
608
|
+
|
609
|
+
Retrieve the top 20 players with the highest number of yellow cards in a league or cup.
|
610
|
+
|
611
|
+
**Query Parameters**
|
612
|
+
|
613
|
+
| Parameter | Type | Required | Description |
|
614
|
+
|-----------|----------|----------|------------------------------------------|
|
615
|
+
| league | Integer | ✅ | The league ID. |
|
616
|
+
| season | Integer | ✅ | The season of the league [YYYY]. |
|
617
|
+
|
618
|
+
**Examples**
|
619
|
+
|
620
|
+
_Retrieve the 20 players with the highest number of yellow cards by league and season_
|
621
|
+
```ruby
|
622
|
+
client.player_top_yellow_cards.list(league: 262, season: 2023)
|
623
|
+
```
|
624
|
+
|
625
|
+
### Player Season
|
626
|
+
|
627
|
+
Retrieve the list of all seasons for which player statistics are available.
|
628
|
+
|
629
|
+
**Query Parameters**
|
630
|
+
|
631
|
+
| Parameter | Type | Required | Description |
|
632
|
+
|-----------|----------|----------|------------------------------------------|
|
633
|
+
| league | Integer | ✅ | The league ID. |
|
634
|
+
| season | Integer | ✅ | The season of the league [YYYY]. |
|
635
|
+
|
636
|
+
**Examples**
|
637
|
+
|
638
|
+
_Retrieve all the available seasons for player statistics_
|
639
|
+
```ruby
|
640
|
+
client.player_seasons.list
|
641
|
+
```
|
642
|
+
|
643
|
+
_Retrieve all the available seasons by player_
|
644
|
+
```ruby
|
645
|
+
client.player_seasons.list(player: 276)
|
646
|
+
```
|
647
|
+
|
648
|
+
### Player Squad
|
649
|
+
|
650
|
+
Retrieve the current roster of a team when queried with the team parameter. When queried with the player parameter, the endpoint returns the collection of teams affiliated with the player.
|
651
|
+
|
652
|
+
This endpoint requires at least one parameter.
|
653
|
+
|
654
|
+
**Query Parameters**
|
655
|
+
|
656
|
+
| Parameter | Type | Required | Description |
|
657
|
+
|-----------|----------|----------|------------------------------------------|
|
658
|
+
| team | Integer | - | The team ID. |
|
659
|
+
| player | Integer | - | The player. |
|
660
|
+
|
661
|
+
**Examples**
|
662
|
+
|
663
|
+
_Retrieve the current squad of a team_
|
664
|
+
```ruby
|
665
|
+
client.player_squads.list(team: 2287)
|
666
|
+
```
|
667
|
+
|
668
|
+
_Retrieve the associated teams for a player_
|
669
|
+
```ruby
|
670
|
+
client.player_squads.list(player: 35603)
|
671
|
+
```
|
672
|
+
|
673
|
+
### Prediction
|
674
|
+
|
675
|
+
Retrieve predictions outcomes for a specific match.
|
676
|
+
|
677
|
+
**Query Parameters**
|
678
|
+
|
679
|
+
| Parameter | Type | Required | Description |
|
680
|
+
|-----------|----------|----------|------------------------------------------|
|
681
|
+
| fixture | Integer | ✅ | The fixture ID. |
|
682
|
+
|
683
|
+
**Examples**
|
684
|
+
|
685
|
+
_Retrieve the predictions for a specific match_
|
686
|
+
```ruby
|
687
|
+
client.predictions.list(fixture: 198772)
|
688
|
+
```
|
689
|
+
|
690
|
+
### Sidelined
|
691
|
+
|
692
|
+
Retrieve all available sidelined for a player or a coach.
|
693
|
+
|
694
|
+
**Query Parameters**
|
695
|
+
|
696
|
+
| Parameter | Type | Required | Description |
|
697
|
+
|-----------|----------|----------|------------------------------------------|
|
698
|
+
| player | Integer | - | The player ID. |
|
699
|
+
| coach | Integer | - | The coach ID. |
|
700
|
+
|
701
|
+
**Examples**
|
702
|
+
|
703
|
+
_Retrieve the available sidelined for a specific player_
|
704
|
+
```ruby
|
705
|
+
client.sidelined.list(player: 35603)
|
706
|
+
```
|
707
|
+
|
708
|
+
_Retrieve the available sidelined for a specific coach_
|
709
|
+
```ruby
|
710
|
+
client.sidelined.list(coach: 2)
|
711
|
+
```
|
712
|
+
|
713
|
+
### Standing
|
714
|
+
|
715
|
+
Retrieve the league or team rankings.
|
716
|
+
|
717
|
+
**Query Parameters**
|
718
|
+
|
719
|
+
| Parameter | Type | Required | Description |
|
720
|
+
|-----------|----------|----------|------------------------------------------|
|
721
|
+
| season | Integer | ✅ | The season of the league [YYYY]. |
|
722
|
+
| league | Integer | - | The league ID. |
|
723
|
+
| team | Integer | - | The team ID. |
|
724
|
+
|
725
|
+
**Examples**
|
726
|
+
|
727
|
+
_Retrieve the team standings by season_
|
728
|
+
```ruby
|
729
|
+
client.standings.list(season: 2023, team: 2287)
|
730
|
+
```
|
731
|
+
|
732
|
+
_Retrieve the league standings by season_
|
733
|
+
```ruby
|
734
|
+
client.standings.list(season: 2023, league: 262)
|
735
|
+
```
|
736
|
+
|
737
|
+
### Team
|
738
|
+
|
739
|
+
Retrieve the list of accessible teams.
|
740
|
+
|
741
|
+
**Query Parameters**
|
742
|
+
|
743
|
+
| Parameter | Type | Required | Description |
|
744
|
+
|-----------|----------|----------|------------------------------------------|
|
745
|
+
| id | Integer | - | The player ID. |
|
746
|
+
| name | String | - | The name of the team. |
|
747
|
+
| league | Integer | - | The league ID. |
|
748
|
+
| season | Integer | - | The season of the league [YYYY]. |
|
749
|
+
| country | String | - | The country name of the team. |
|
750
|
+
| code | String | - | The country code [2-3 characters]. |
|
751
|
+
| venue | Integer | - | The venue ID. |
|
752
|
+
| search | String | - | The name or the country name of the team [>= 3 characters]. |
|
753
|
+
|
754
|
+
**Examples**
|
755
|
+
|
756
|
+
_Retrieve teams by name_
|
757
|
+
```ruby
|
758
|
+
client.teams.list(name: "manchester united")
|
759
|
+
```
|
760
|
+
|
761
|
+
_Retrive teams by country_
|
762
|
+
```ruby
|
763
|
+
client.teams.list(country: "Mexico")
|
764
|
+
```
|
765
|
+
|
766
|
+
_Retrive teams by league and season_
|
767
|
+
```ruby
|
768
|
+
client.teams.list(league: 262, season: 2023)
|
769
|
+
```
|
770
|
+
|
771
|
+
_Search teams_
|
772
|
+
```ruby
|
773
|
+
client.teams.list(search: "real")
|
774
|
+
```
|
775
|
+
|
776
|
+
_Get a team by ID_
|
777
|
+
```ruby
|
778
|
+
client.teams.find(id: 2287)
|
779
|
+
```
|
780
|
+
|
781
|
+
### Team Country
|
782
|
+
|
783
|
+
Retrieve the list of countries available for the teams endpoint.
|
784
|
+
|
785
|
+
**Query Parameters**
|
786
|
+
|
787
|
+
| Parameter | Type | Required | Description |
|
788
|
+
|-----------|----------|----------|------------------------------------------|
|
789
|
+
| - | - | | - |
|
790
|
+
|
791
|
+
**Examples**
|
792
|
+
|
793
|
+
_Retrieve the available countries list for teams_
|
794
|
+
```ruby
|
795
|
+
client.team_countries.list
|
796
|
+
```
|
797
|
+
|
798
|
+
### Team Season
|
799
|
+
|
800
|
+
Retrieve the catalog of seasons in which a team has participated.
|
801
|
+
|
802
|
+
**Query Parameters**
|
803
|
+
|
804
|
+
| Parameter | Type | Required | Description |
|
805
|
+
|-----------|----------|----------|------------------------------------------|
|
806
|
+
| team | Integer | ✅ | The team ID. |
|
807
|
+
|
808
|
+
**Examples**
|
809
|
+
|
810
|
+
_Retrieve the seasons in which the team has participated_
|
811
|
+
```ruby
|
812
|
+
client.team_seasons.list(team: 2287)
|
813
|
+
```
|
814
|
+
|
815
|
+
### Team Statistic
|
816
|
+
|
817
|
+
Retrieve the performance metrics of a team for a specific competition and season.
|
818
|
+
|
819
|
+
**Query Parameters**
|
820
|
+
|
821
|
+
| Parameter | Type | Required | Description |
|
822
|
+
|-----------|----------|----------|------------------------------------------|
|
823
|
+
| team | Integer | ✅ | The team ID. |
|
824
|
+
| league | Integer | ✅ | The league ID. |
|
825
|
+
| season | Integer | ✅ | The season of the league [YYYY]. |
|
826
|
+
| date | String | - | The limit date ["YYYY-MM-DD"]. |
|
827
|
+
|
828
|
+
**Examples**
|
829
|
+
|
830
|
+
_Retrieve statistics for a tema in an specific league and season_
|
831
|
+
```ruby
|
832
|
+
client.team_statistics.find(league: 262, team: 2287, season: 2023)
|
833
|
+
```
|
834
|
+
|
835
|
+
### Timezone
|
836
|
+
|
837
|
+
Retrieve the catalog of time zones that can be utilized in the fixtures endpoint.
|
838
|
+
|
839
|
+
**Query Parameters**
|
840
|
+
|
841
|
+
| Parameter | Type | Required | Description |
|
842
|
+
|-----------|----------|----------|------------------------------------------|
|
843
|
+
| - | - | | - |
|
844
|
+
|
845
|
+
**Examples**
|
846
|
+
|
847
|
+
_Retrieve the available timezones_
|
848
|
+
```ruby
|
849
|
+
client.timezones.list
|
850
|
+
```
|
851
|
+
|
852
|
+
### Transfer
|
853
|
+
|
854
|
+
Retrieve the catalog of player and team transfers.
|
855
|
+
|
856
|
+
**Query Parameters**
|
857
|
+
|
858
|
+
| Parameter | Type | Required | Description |
|
859
|
+
|-----------|----------|----------|------------------------------------------|
|
860
|
+
| team | Integer | - | The team ID. |
|
861
|
+
| player | Integer | - | The player ID. |
|
862
|
+
|
863
|
+
**Examples**
|
864
|
+
|
865
|
+
_Retrieve the transfers for a team_
|
866
|
+
```ruby
|
867
|
+
client.transfers.list(team: 2287)
|
868
|
+
```
|
869
|
+
|
870
|
+
_Retrieve the transfers for a players_
|
871
|
+
```ruby
|
872
|
+
client.transfers.list(player: 35603)
|
873
|
+
```
|
874
|
+
|
875
|
+
### Trophy
|
876
|
+
|
877
|
+
Retrieve the catalog of all trophies won by a player or a coach.
|
878
|
+
|
879
|
+
**Query Parameters**
|
880
|
+
|
881
|
+
| Parameter | Type | Required | Description |
|
882
|
+
|-----------|----------|----------|------------------------------------------|
|
883
|
+
| player | Integer | - | The player ID. |
|
884
|
+
| coach | Integer | - | The coach ID. |
|
885
|
+
|
886
|
+
**Examples**
|
887
|
+
|
888
|
+
_Retrieve the trophies list from a player_
|
889
|
+
```ruby
|
890
|
+
client.trophies.list(player: 35603)
|
891
|
+
```
|
892
|
+
|
893
|
+
_Retrieve the trophies list from a coach_
|
894
|
+
```ruby
|
895
|
+
client.trophies.list(coach: 2)
|
896
|
+
```
|
897
|
+
|
898
|
+
### Venue
|
899
|
+
|
900
|
+
Retrieve the catalog of accessible venues.
|
901
|
+
|
902
|
+
**Query Parameters**
|
903
|
+
|
904
|
+
| Parameter | Type | Required | Description |
|
905
|
+
|-----------|----------|----------|------------------------------------------|
|
906
|
+
| id | Integer | - | The venue ID. |
|
907
|
+
| name | String | - | The name of the venue. |
|
908
|
+
| city | String | - | The city of the venue. |
|
909
|
+
| country | String | - | The country name of the venue. |
|
910
|
+
| search | String | - | The name, city or the country of the venue [>= 3 characters]. |
|
911
|
+
|
912
|
+
**Examples**
|
913
|
+
|
914
|
+
_Retrieve the venues from a country_
|
915
|
+
```ruby
|
916
|
+
client.venues.list(search: "Mex")
|
917
|
+
```
|
918
|
+
|
919
|
+
_Retrieve the venues by name_
|
920
|
+
```ruby
|
921
|
+
client.venues.list(name: "Old Trafford")
|
922
|
+
```
|
923
|
+
|
924
|
+
_Retrieve the venues by city_
|
925
|
+
```ruby
|
926
|
+
client.venues.list(city: "Manchester")
|
927
|
+
```
|
928
|
+
|
929
|
+
_Get the venue by ID_
|
930
|
+
```ruby
|
931
|
+
client.venues.find(id: 556)
|
932
|
+
```
|