library(rscview)
library(pins)
library(dplyr)
check_envvars()

Authenticated access from a user is required. If an "administrator" role is used, then all content items will be returned regardless of the visibility to the requesting user.

Pull Group Names and Group Members

start_time <- Sys.time()
group_names_tbl <- connectapi::get_groups(src = create_connection(), limit = Inf) %>% dplyr::rename(group_name = name)
end_time <- Sys.time()
duration <- end_time - start_time

Info: connectapi::get_groups() took r paste(round(duration[[1]], 2), units(duration)) to run.

start_time <- Sys.time()
group_members_tbl <- get_groups_tbl()

end_time <- Sys.time()
duration <- end_time - start_time

Info: get_groups_tbl took r paste(round(duration[[1]], 2), units(duration)) to run.

Pin Group List to RStudio Connect

create_pin(group_names_tbl, description = "Results pulled via `connectapi` for audit reports")
create_pin(group_members_tbl, description = "Results pulled via `connectapi` for audit reports")
# TO DO: add a create_tag to collect all the pins and dashboards

# TO DO: add in a set_schedule command


kmasiello/rscview documentation built on Jan. 3, 2023, 2:58 p.m.