nhl_url_tournaments {nhlapi} | R Documentation |
Create an NHL API URL for tournaments
Description
Create an NHL API URL for tournaments
Usage
nhl_url_tournaments(tournamentTypes, seasons = NULL, expand = NULL)
Arguments
tournamentTypes |
character() , vector of one or more
tournament types. Currently supported types seem to be
-
"playoffs"
-
"olympics"
-
"worldCup"
Those are exposed via shorthand functions
|
seasons |
numeric() , integer() or character() ,
vector of starting years of desired seasons in YYYY
format, e.g. 1995 or "1995" for season 1995-1996.
Accepts vectors such as c(1995:2000, 2010) to generate
multiple seasons.
Alternatively, also accepts character() with seasons in the
format "YYYYZZZZ" , where ZZZZ = YYYY + 1 , e.g. "19951996" .
This is the format that ultimately gets sent to the NHL API.
Some API endpoints, notably seasons exposed via nhl_seasons()
also allow the value "current" to passed. This value will be
returned unchanged.
|
expand |
character() , of parameters passed as expand
to the API URL. Two valid examples seem to be "round.series"
and "schedule.game.seriesSummary" . NULL for no expand
parameter.
|
Value
character()
, API URLs, same length as combinations of
tournamentTypes
, seasons
and expand
.
See Also
nhl_md_tournament_types()
Examples
nhlapi:::nhl_url_tournaments("olympics")
nhlapi:::nhl_url_tournaments("playoffs", 2015:2016)
nhlapi:::nhl_url_tournaments("playoffs", 2015:2016, "round.series")
[Package
nhlapi version 0.1.4
Index]