From 5d6c2885906922884464e781fcdbd5035c629339 Mon Sep 17 00:00:00 2001 From: Salim B Date: Thu, 5 Sep 2024 00:02:56 +0200 Subject: [PATCH] fix: export S3 methods this fixes roxygen2 warnings and is the right thing to do, cf.: - https://roxygen2.r-lib.org/articles/namespace.html#s3 - https://github.com/r-lib/roxygen2/issues/1322 --- NAMESPACE | 3 +++ R/process.R | 3 +++ 2 files changed, 6 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index a181db4ad9..1512977bb3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -40,6 +40,9 @@ S3method(print,api_grid_local) S3method(print,api_plot) S3method(print,kaleidoScope) S3method(print,plotly_data) +S3method(process,api_image) +S3method(process,api_plot) +S3method(process,default) S3method(to_basic,GeomAbline) S3method(to_basic,GeomAlluvium) S3method(to_basic,GeomAnnotationMap) diff --git a/R/process.R b/R/process.R index bd987b0f21..bb422e6839 100644 --- a/R/process.R +++ b/R/process.R @@ -6,14 +6,17 @@ process <- function(resp) { UseMethod("process") } +#' @export process.default <- function(resp) { json_content(relay_error(resp)) } +#' @export process.api_plot <- function(resp) { json_content(relay_error(resp)) } +#' @export process.api_image <- function(resp) { relay_error(resp) type <- resp[["headers"]][["content-type"]]