toa_sports_scores: *Find scores for the sports which are accessible through the...

View source: R/toa_sports_scores.R

toa_sports_scoresR Documentation

Find scores for the sports which are accessible through the Odds API

Description

Get 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'))

Usage

toa_sports_scores(sport_key, days_from = 1, date_format = "iso")

Arguments

sport_key

(string, required): The sport_key to look up odds for. See toa_sports() for a full lookup of sport_key values.

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


   try(toa_sports_scores(sport_key = 'baseball_mlb', 
                         days_from = NULL,
                         date_format = 'iso'))



oddsapiR documentation built on March 31, 2023, 5:27 p.m.