Nothing
#' @title **MLB Runner Detail Types**
#' @return Returns a tibble with the following columns
#'
#' |col_name |types |description |
#' |:---------|:---------|:------------------------------------------------------|
#' |stat_name |character |Name of the runner detail stat (e.g. 'r_force_out'). |
#'
#' @export
#' @examples \donttest{
#' try(mlb_runner_detail_types())
#' }
mlb_runner_detail_types <- function(){
mlb_endpoint <- mlb_stats_endpoint("v1/runnerDetailTypes")
query_params <- list()
mlb_endpoint <- httr2::url_modify_query(mlb_endpoint, !!!query_params)
runner_detail_types <- NULL
tryCatch(
expr = {
resp <- mlb_endpoint |>
mlb_api_call()
runner_detail_types <- jsonlite::fromJSON(jsonlite::toJSON(resp), flatten = TRUE) |>
janitor::clean_names() |>
as.data.frame() |>
make_baseballr_data("MLB Runner Detail Types data from MLB.com",Sys.time())
},
error = function(e) {
cli::cli_alert_danger("{Sys.time()}: Invalid arguments provided")
},
finally = {
}
)
return(runner_detail_types)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.