nhl_teams: Retrieve metadata on NHL teams from the API

Description Usage Arguments Details Value Examples

View source: R/nhl_teams.R

Description

Retrieves team metadata such as the teams names, abbreviations, locations, conferences, venues, etc.

Usage

1
nhl_teams(teamIds = NULL, params = NULL)

Arguments

teamIds

integer(), ids of the teams or NULL (default) for all teams. As of end of 2019, the valid team ids seem to be in the 1:54 range.

params

named list(), further parameters passed to nhl_url_teams.

Details

The API allows to retrieve data on all teams at once, which is achieved by the default NULL value for the team id.

Value

data.frame, with data on teams, one row per team.

Examples

1
2
3
4
5
## Not run: 
  nhl_teams()
  nhl_teams(1:3)

## End(Not run)

nhlapi documentation built on Feb. 20, 2021, 9:06 a.m.