Returns NHL Schedule data

nhl_schedule(season = NULL, day = as.Date(Sys.Date(), "%Y-%m-%d"))

Arguments

season

NHL Season

day

Date

Value

Returns a tibble

Examples

# \donttest{
  nhl_schedule(season = 2021)
#>         game_id                              link game_type_abbreviation
#>   1: 2020020001 /api/v1/game/2020020001/feed/live                      R
#>   2: 2020020003 /api/v1/game/2020020003/feed/live                      R
#>   3: 2020020002 /api/v1/game/2020020002/feed/live                      R
#>   4: 2020020004 /api/v1/game/2020020004/feed/live                      R
#>   5: 2020020005 /api/v1/game/2020020005/feed/live                      R
#>  ---                                                                    
#> 948: 2020030411 /api/v1/game/2020030411/feed/live                      P
#> 949: 2020030412 /api/v1/game/2020030412/feed/live                      P
#> 950: 2020030413 /api/v1/game/2020030413/feed/live                      P
#> 951: 2020030414 /api/v1/game/2020030414/feed/live                      P
#> 952: 2020030415 /api/v1/game/2020030415/feed/live                      P
#>      season_full       game_date_time status_abstract_game_state
#>   1:    20202021 2021-01-13T22:30:00Z                      Final
#>   2:    20202021 2021-01-14T00:00:00Z                      Final
#>   3:    20202021 2021-01-14T01:00:00Z                      Final
#>   4:    20202021 2021-01-14T03:00:00Z                      Final
#>   5:    20202021 2021-01-14T03:30:00Z                      Final
#>  ---                                                            
#> 948:    20202021 2021-06-29T00:00:00Z                      Final
#> 949:    20202021 2021-07-01T00:00:00Z                      Final
#> 950:    20202021 2021-07-03T00:00:00Z                      Final
#> 951:    20202021 2021-07-06T00:00:00Z                      Final
#> 952:    20202021 2021-07-08T00:00:00Z                      Final
#>      status_coded_game_state status_detailed_state status_status_code
#>   1:                       7                 Final                  7
#>   2:                       7                 Final                  7
#>   3:                       7                 Final                  7
#>   4:                       7                 Final                  7
#>   5:                       7                 Final                  7
#>  ---                                                                 
#> 948:                       7                 Final                  7
#> 949:                       7                 Final                  7
#> 950:                       7                 Final                  7
#> 951:                       7                 Final                  7
#> 952:                       7                 Final                  7
#>      status_start_time_tbd away_score away_team_id      away_team_name
#>   1:                 FALSE          3            5 Pittsburgh Penguins
#>   2:                 FALSE          4            8  Montréal Canadiens
#>   3:                 FALSE          1           16  Chicago Blackhawks
#>   4:                 FALSE          5           23   Vancouver Canucks
#>   5:                 FALSE          4           19     St. Louis Blues
#>  ---                                                                  
#> 948:                 FALSE          1            8  Montréal Canadiens
#> 949:                 FALSE          1            8  Montréal Canadiens
#> 950:                 FALSE          6           14 Tampa Bay Lightning
#> 951:                 FALSE          2           14 Tampa Bay Lightning
#> 952:                 FALSE          0            8  Montréal Canadiens
#>        away_team_link home_score home_team_id      home_team_name
#>   1:  /api/v1/teams/5          6            4 Philadelphia Flyers
#>   2:  /api/v1/teams/8          5           10 Toronto Maple Leafs
#>   3: /api/v1/teams/16          5           14 Tampa Bay Lightning
#>   4: /api/v1/teams/23          3           22     Edmonton Oilers
#>   5: /api/v1/teams/19          1           21  Colorado Avalanche
#>  ---                                                             
#> 948:  /api/v1/teams/8          5           14 Tampa Bay Lightning
#> 949:  /api/v1/teams/8          3           14 Tampa Bay Lightning
#> 950: /api/v1/teams/14          3            8  Montréal Canadiens
#> 951: /api/v1/teams/14          3            8  Montréal Canadiens
#> 952:  /api/v1/teams/8          1           14 Tampa Bay Lightning
#>        home_team_link         venue_name          venue_link venue_id
#>   1:  /api/v1/teams/4 Wells Fargo Center /api/v1/venues/5096     5096
#>   2: /api/v1/teams/10   Scotiabank Arena /api/v1/venues/null       NA
#>   3: /api/v1/teams/14       Amalie Arena /api/v1/venues/5017     5017
#>   4: /api/v1/teams/22       Rogers Place /api/v1/venues/5100     5100
#>   5: /api/v1/teams/21         Ball Arena /api/v1/venues/5064     5064
#>  ---                                                                 
#> 948: /api/v1/teams/14       Amalie Arena /api/v1/venues/5017     5017
#> 949: /api/v1/teams/14       Amalie Arena /api/v1/venues/5017     5017
#> 950:  /api/v1/teams/8        Centre Bell /api/v1/venues/null       NA
#> 951:  /api/v1/teams/8        Centre Bell /api/v1/venues/null       NA
#> 952: /api/v1/teams/14       Amalie Arena /api/v1/venues/5017     5017
#>                         content_link game_type  game_date
#>   1: /api/v1/game/2020020001/content       REG 2021-01-13
#>   2: /api/v1/game/2020020003/content       REG 2021-01-14
#>   3: /api/v1/game/2020020002/content       REG 2021-01-14
#>   4: /api/v1/game/2020020004/content       REG 2021-01-14
#>   5: /api/v1/game/2020020005/content       REG 2021-01-14
#>  ---                                                     
#> 948: /api/v1/game/2020030411/content      POST 2021-06-29
#> 949: /api/v1/game/2020030412/content      POST 2021-07-01
#> 950: /api/v1/game/2020030413/content      POST 2021-07-03
#> 951: /api/v1/game/2020030414/content      POST 2021-07-06
#> 952: /api/v1/game/2020030415/content      POST 2021-07-08
# }