R/utils.R

Defines functions GetData

GetData <- function(url, api_key, format) {
  res <- getURL(url, userpwd=api_key)
  if(tolower(format) == "json") {
    res <- fromJSON(res)
  } else if(tolower(format) == "xml") {
    res <- XMLToList(res)
  }
  return(res)
}
noahhl/rCampaignMonitor documentation built on May 23, 2019, 9:29 p.m.