Skip to contents

Get the Sports for which the Odds API provides coverage

 toa_sports(all_sports=TRUE)

Usage

toa_sports(all_sports = TRUE)

Arguments

all_sports

(Logical required): If true, returns all sports and if false, returns only active sports. Defaults to true.

Value

Sports for which The Odds API provides betting information for as a tibble:

col_nametypes
keycharacter
groupcharacter
titlecharacter
descriptioncharacter
activelogical
has_outrightslogical

Examples

# \donttest{
  try(toa_sports(all_sports = TRUE))
#> ── Sports coverage data from the-odds-api.com ──────── oddsapiR 0.0.3 ──
#>  Data updated: 2023-03-19 21:44:06 UTC
#> # A tibble: 94 × 6
#>    key                                group title descr…¹ active has_o…²
#>    <chr>                              <chr> <chr> <chr>   <lgl>  <lgl>  
#>  1 americanfootball_cfl               Amer… CFL   Canadi… FALSE  FALSE  
#>  2 americanfootball_ncaaf             Amer… NCAAF US Col… TRUE   FALSE  
#>  3 americanfootball_nfl               Amer… NFL   US Foo… FALSE  FALSE  
#>  4 americanfootball_nfl_preseason     Amer… NFL … US Foo… FALSE  FALSE  
#>  5 americanfootball_nfl_super_bowl_w… Amer… NFL … Super … TRUE   TRUE   
#>  6 americanfootball_xfl               Amer… XFL   US Foo… TRUE   FALSE  
#>  7 aussierules_afl                    Auss… AFL   Aussie… TRUE   FALSE  
#>  8 baseball_mlb                       Base… MLB   Major … FALSE  FALSE  
#>  9 baseball_mlb_preseason             Base… MLB … Major … TRUE   FALSE  
#> 10 baseball_mlb_world_series_winner   Base… MLB … World … TRUE   TRUE   
#> # … with 84 more rows, and abbreviated variable names ¹​description,
#> #   ²​has_outrights
# }