R/whatismyip.R

#' Returns the IP address you use to call the API
#'
#' @return String with IP.
#'
#' @examples
#' \dontrun{
#' whatismyip()
#' }
#'
#' @export

whatismyip <- function() {
  res <- jsonlite::fromJSON('https://api.repec.org/call.cgi?whatismyip=1')

  return(res)
}

#' @rdname whatismyip
#' @export
what_is_myip <- whatismyip

Try the repec package in your browser

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

repec documentation built on May 1, 2019, 7:20 p.m.