R/ns-me.R

Defines functions ns_get_me

Documented in ns_get_me

#' Information about the current user
#'
#' Based on login credential, returns
#' information on the user accessing the
#' Nettskjema PI
#'
#' @return list of information
#' @export
#' @examples
#' \dontrun{
#' ns_get_me()
#' }
ns_get_me <- function() {
  ns_req() |>
    httr2::req_url_path_append("me") |>
    httr2::req_perform() |>
    httr2::resp_body_json()
}

Try the nettskjemar package in your browser

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

nettskjemar documentation built on April 4, 2025, 12:22 a.m.