
Find scores for the sports which are accessible through the Odds API
Source:R/toa_sports_scores.R
toa_sports_scores.RdGet the scores for the sports which the Odds API provides coverage
try(toa_sports_scores(sport_key = 'baseball_mlb',
days_from = NULL,
date_format = 'iso'))Arguments
- sport_key
(string, required): The
sport_keyto look up odds for. Seetoa_sports()for a full lookup ofsport_keyvalues.- days_from
(integer, optional): Integer from 1 to 3. Defaults to 1.
- date_format
(string, optional): Date format. Options include:
iso
unix
Value
Sports scores which The Odds API provides scores information for as a tibble:
| col_name | types |
| id | character |
| sport_key | character |
| sport_title | character |
| commence_time | character |
| completed | logical |
| home_team | character |
| away_team | character |
| scores | logical |
| last_update | logical |
Examples
# \donttest{
try(toa_sports_scores(sport_key = 'baseball_mlb',
days_from = NULL,
date_format = 'iso'))
#> ── Sports Odds data from the-odds-api.com ──────────── oddsapiR 0.0.3 ──
#> ℹ Data updated: 2023-03-19 21:44:08 UTC
#> # A tibble: 0 × 0
# }