R/getMlbstatsJSON.R

Defines functions .getMlbstatsJSON

## FUNCTION THAT WILL CHECK ALL CALLS FOR FAILURES AND CONVERT JSON RESPONSES
#####

.getMlbstatsJSON <- function(url, .opts, httpheader, ...){
  
  tryGetURL <- getURL(url, .opts=.opts, .encoding='UTF-8',
                      httpheader=httpheader, ...)
  tryGetURL <- fromJSON(tryGetURL)
  
  return(tryGetURL)
}
brian-bot/mlbstats documentation built on Oct. 13, 2023, 2:34 a.m.