Description Usage Arguments Value Functions Examples
The general-purpose nhl_schedule()
exposes many parameters,
some useful helpers are exposed as separate functions to
reflect common use cases. Arguments can be passed to these
named via ...
.
nhl_schedule_today()
nhl_schedule_seasons()
nhl_schedule_date_range()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | nhl_schedule(
seasons = NULL,
teamIds = NULL,
startDate = NULL,
endDate = NULL,
gameTypes = NULL,
expand = NULL
)
nhl_schedule_today(...)
nhl_schedule_seasons(seasons, ...)
nhl_schedule_date_range(startDate, endDate, ...)
|
seasons |
Alternatively, also accepts Some API endpoints, notably |
teamIds |
|
startDate |
|
endDate |
|
gameTypes |
|
expand |
|
... |
other named parameters passed to |
list
, with information on schedule, depending on
provided arguments.
nhl_schedule_today
: Shortcut to get information on
today's schedule.
nhl_schedule_seasons
: Shortcut to get information on schedule for
one or more seasons.
nhl_schedule_date_range
: Shortcut to get information on
schedule for a range of dates in "YYYY-MM-DD"
format.
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ## Not run:
# Get current schedule
nhl_schedule()
# Get schedule for historical seasons
nhl_schedule(seasons = 2015:2016)
# Get schedule for a date range
nhl_schedule(startDate = "2018-01-02", endDate = "2018-01-02")
# Get schedule for a date range, specific teams
# and expand on line scores
nhl_schedule(
startDate = "2018-01-02",
endDate = "2018-01-02",
teamIds = c(29, 30),
expand = "schedule.linescore"
)
## End(Not run)
## Not run:
nhl_schedule_today()
## End(Not run)
## Not run:
# Schedule for seasons starting in 2015 and 2016
nhl_schedule_seasons(2015:2016)
# Schedule for seasons starting in 2015 and 2016
# Only 1 team and expand line scores
nhl_schedule_seasons(
2015:2016,
teamIds = 1,
expand = "schedule.linescore"
)
## End(Not run)
## Not run:
# Schedule for October and November 2015
nhl_schedule_date_range(
startDate = "2015-10-01",
endDate = "2015-11-30"
)
# Schedule for October and November 2015
# Regular seasons only, specific team and expand line scores
nhl_schedule_date_range(
startDate = "2015-10-01", endDate = "2015-11-30",
gameTypes = "R",
teamIds = 2,
expand = "schedule.linescore"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.