R/Official.R

Defines functions officials

Documented in officials

#' Access all the officials
#' 
#' `officials()` scrapes all the officials.
#' 
#' @returns data.frame with one row per official
#' @examples
#' all_officials <- officials()
#' @export

officials <- function() {
  tryCatch({
    nhl_api(
      path = 'officials',
      type = 'r'
    )$data
  }, error = function(e) {
    message('Unable to create connection; please try again later.')
    data.frame()
  })
}

Try the nhlscraper package in your browser

Any scripts or data that you put into this service are public.

nhlscraper documentation built on Dec. 17, 2025, 5:10 p.m.