-
Notifications
You must be signed in to change notification settings - Fork 7
/
nhl_get_data_worker.Rd
37 lines (33 loc) · 1.15 KB
/
nhl_get_data_worker.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nhl_get_data.R
\name{nhl_get_data_worker}
\alias{nhl_get_data_worker}
\title{Get data from the API for 1 URL}
\usage{
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")
)
}
\arguments{
\item{url}{\code{character(1)}, the URL to get the data from.}
\item{flatten}{\code{logical(1)}, if \code{TRUE} (default) automatically
flattens nested data frames into a single non-nested data frame.}
\item{silent}{\code{logical(1)}, passed to \verb{[try()]}.}
\item{retries}{\code{integer(1)}, number of retries in case of failed
data retrieval (\code{0L} for no no retries).}
\item{retrySleep}{\code{integer(1)}, number of seconds to
\verb{[Sys.sleep()]} in between retries.}
}
\value{
\code{list}, with the retrieved data or class \code{nhl_get_data_error}.
}
\description{
Gets data from the NHL API using \code{\link[=nhl_from_json]{nhl_from_json()}}.
}
\seealso{
\code{\link[=nhl_from_json]{nhl_from_json()}}, \code{\link[=nhl_url]{nhl_url()}}
}