R/listsegments.R

Defines functions listsegments

listsegments <- function(listID,auth=Sys.getenv("CampMonauth")){
  url <- paste0('https://api.createsend.com/api/v3.2/lists/',listID,'/segments.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.