R/membership.R

Defines functions membership

Documented in membership

#' membership
#'
#' @export
#' @template all
#' @template return
#' @examples \dontrun{
#' # Create a CouchDB connection client
#' user <- Sys.getenv("COUCHDB_TEST_USER")
#' pwd <- Sys.getenv("COUCHDB_TEST_PWD")
#' (x <- Cushion$new(user = user, pwd = pwd))
#'
#' membership(x)
#' membership(x, as = "json")
#' }
membership <- function(cushion, as = "list", ...) {
  check_cushion(cushion)
  sofa_GET(file.path(cushion$make_url(), "_membership"),
    as = as, headers = cushion$get_headers(),
    auth = cushion$get_auth(), ...
  )
}

Try the sofa package in your browser

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

sofa documentation built on July 22, 2026, 1:06 a.m.