sportsdataverse / hoopR

An R package to quickly obtain clean and tidy men's basketball play by play data.
http://hoopr.sportsdataverse.org/
Other
81 stars 17 forks source link

nba_schedule() not returning as expected #124

Closed rossdrucker closed 8 months ago

rossdrucker commented 9 months ago

Describe the bug nba_schedule() function does not return expected table. Believe this is due to a slightly different response structure than previous.

To Reproduce

hoopR::nba_schedule(league_id = "00", season = "2023-24")
#> 2023-10-06 16:12:41: Invalid arguments or no league schedule data for 2023-24 available!
#> Error in hoopR::nba_schedule(league_id = "00", season = "2023-24"): object 'games' not found

Created on 2023-10-06 with reprex v2.0.2

Expected behavior Should return complete NBA schedule for the season specified

Additional context May need to switch from tidyr::unnest() to purrr::pluck() and append the columns here