Gets data from the NHL API using nhl_from_json()
.
nhl_get_data_worker(
url,
flatten = getOption("nhlapi_flatten"),
silent = getOption("nhlapi_try_silent"),
retries = getOption("nhlapi_get_retries"),
retrySleep = getOption("nhlapi_get_retry_sleep")
)
character(1)
, the URL to get the data from.
logical(1)
, if TRUE
(default) automatically
flattens nested data frames into a single non-nested data frame.
logical(1)
, passed to [try()]
.
integer(1)
, number of retries in case of failed
data retrieval (0L
for no no retries).
integer(1)
, number of seconds to
[Sys.sleep()]
in between retries.
list
, with the retrieved data or class nhl_get_data_error
.