R/collapse_events.R

Defines functions collapse_events_count collapse_events

#' @noRd
#' @keywords Internal
collapse_events <- function(x){
  browser()
}

#' Internal function to run `capture()` for type = "events"
#' @noRd
#' @keywords Internal
collapse_events_count <- function(x){

    result <- list(eventSearch = list(documents = list(total = list()))) |>
      jsonlite::toJSON(auto_unbox = TRUE,
                       pretty = FALSE)

    x$body <- glue::glue("query list {result}") |>
      stringr::str_remove_all(":\\[\\]") |>
      stringr::str_remove_all(":|\"") 

  x
}

Try the galah package in your browser

Any scripts or data that you put into this service are public.

galah documentation built on Sept. 18, 2026, 9:08 a.m.