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 Sept. 6, 2018, 1:45 a.m.