R/api-get_users_me.R

Defines functions get_users_me

Documented in get_users_me

#' Get the user information
#'
#' @description Get the user information from Consibio APIs.
#'
#'
#' @return A matrix with the user information.
#' @importFrom magrittr `%>%`
#' @importFrom httr2 resp_body_json
#'
#' @details See details in https://api.v2.consibio.com/api-docs/#/default/get_users_me
#' @export
#'
#' @examples
#' \dontrun{
#' get_users_me()
#' }
get_users_me <- function() {
  result <- client_req_perform("/users/me", error_msg = "Failed to get Users Me")

  # Handle the result inside the conditional
  content <- result |> httr2::resp_body_json(auto_unbox = TRUE)

  content$payload
}

Try the consibiocloudclient package in your browser

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

consibiocloudclient documentation built on Sept. 12, 2024, 9:34 a.m.