R/geco_projects.R

Defines functions .list_projects_data list_projects

Documented in list_projects

#' Lists available projects
#'
#' Lists projects available to the authenticated user.
#'
#' This function fetches the list of projects available to the
#' authenticated user from the Generable API. Included are the
#' project id, description, and other information pertient to
#' the project.
#'
#' @return data.frame containing information about each available project,
#'    one project per row.
#' @export
list_projects <- function() {
  projects <- .list_projects_data()
  return(projects)
}

.list_projects_data <- function() {
  projects <- geco_api(PROJECTS)
  p <- as_dataframe.geco_api_data(projects, flatten_names = c())
}
generable/rgeco documentation built on Oct. 16, 2024, 2:45 a.m.