Skip to content

Commit

Permalink
Update cat_for_status.R
Browse files Browse the repository at this point in the history
  • Loading branch information
fubar1337 committed May 17, 2023
1 parent 5a29383 commit 8f92310
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/cat_for_status.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @param code An http status code
#' @param browse (logical) If `TRUE`, opens image in default browser. If
#' `FALSE`, returns the URL of the image.
#' @details uses a service for cats (https://http.cat) and
#' @details uses a service for cats (https://httpcats.com) and
#' dogs (https://http.dog) and goats (https://httpgoats.com)
#' @return Opens image in your default browser, or returns URL
#' @examples \dontrun{
Expand All @@ -33,7 +33,7 @@ cat_for_status <- function(code, browse = FALSE) {
assert(browse, "logical")
code <- as.character(code)
if (code %in% names(status_codes)) {
url <- sprintf('https://http.cat/%s', code)
url <- sprintf('https://httpcats.com/%s', code)
if (browse) utils::browseURL(url) else url
} else {
stopcode("No cat code found", code)
Expand Down

0 comments on commit 8f92310

Please sign in to comment.