R/lotame_audiences.R

Defines functions lotame_audiences

Documented in lotame_audiences

#'@title Lotame Audiences
#'@description
#'This function returns a data frame of audiences for the requested client.
#'  
#'@export 
lotame_audiences <- function(client_id,
                             page_count = 50){
  options(scipen=999)
  path <- paste0("https://api.lotame.com/2/audiences?client_id=",
                 client_id,
                 "&page_count=",
                 page_count)
  service_ticket <- lotame_service_ticket(path)
  req <- jsonlite::fromJSON(paste0(path,"&ticket=",service_ticket))
  audiences <- req$Audience
}
jackpalmer/LotameR documentation built on May 18, 2019, 7:57 a.m.