R/list_campaigns.R

Defines functions list_campaigns

Documented in list_campaigns

list_campaigns <- function(client = Client()$ClientID,auth=Sys.getenv("CampMonauth")){
  url <- paste0('https://api.createsend.com/api/v3.2/clients/',client,'/campaigns','.json', collapse = ", ")
  
  raw.result = GET(url = url,authenticate(user = auth, password = ""))
  
  this.raw.content <- rawToChar(raw.result$content)
  
  this.content <- fromJSON(this.raw.content)
  
  return(as.data.frame(this.content))
}
mark-brackenrig/campaignmonitoR documentation built on Oct. 9, 2018, 4:59 a.m.