Query the result of draft by year summary report endpoint on the NHL.com API.

draft_pick(pick_number = 1, round_number = NULL, year = NULL)

Arguments

pick_number

int in range [1,38]

round_number

int in in range [1,25]

year

str containing a year from 1963 to 2019

Value

data.frame

Details

Depending on information provided in the parameters function will return summary on a person picked in specified draft round, pick and year. If year is not specified then all of the draft picks for that year will be returned. If no round is specified the dataframe will include all of the players with chosen pick number from every round.

There are cases when even though user entered valid parameters, output would be empty if a pick number didn't exist in a specified round, warning would be raised.

Examples

draft_pick(pick_number = 1, round_number = 2, year = '2019')
#> Player triCode Pick_number Round_number Year #> 11402 Shane Pinto OTT 1 2 2019