diff --git a/DESCRIPTION b/DESCRIPTION index 9ddb0d0..d53573a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -23,4 +23,5 @@ Config/Needs/website: rmarkdown Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.0 +RoxygenNote: 7.3.2 +Language: en diff --git a/NEWS.md b/NEWS.md index d879e44..2c5bf40 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # resios (development version) +* Fixed examples when run without token * Moved to rOpenSpain (documentation) * Initial release. diff --git a/R/esios-indicators.R b/R/esios-indicators.R index 5dad6b4..73550cd 100644 --- a/R/esios-indicators.R +++ b/R/esios-indicators.R @@ -62,6 +62,7 @@ esios_search_indicators <- function(text = NULL, taxonomy_terms = NULL, taxonomy #' \donttest{ #' ei10001 <- esios_indicators(10001) #' head(ei10001) +#' dr <- esios_indicators(1293) #' } esios_indicators <- function(indicator, locale = NULL, datetime = NULL, start_date = NULL, end_date = NULL, diff --git a/R/get_token.R b/R/get_token.R index 4eb1e30..fd5940c 100644 --- a/R/get_token.R +++ b/R/get_token.R @@ -29,3 +29,8 @@ get_token <- function(token = NULL) { check_token <- function() { Sys.getenv("ESIOS_TOKEN", NA_character_) } + + +there_is_token <- function(token = NULL) { + !is.na(get_token(token)) +} diff --git a/man/esios_pvpc.Rd b/man/esios_pvpc.Rd index 509b73e..36214fe 100644 --- a/man/esios_pvpc.Rd +++ b/man/esios_pvpc.Rd @@ -51,8 +51,10 @@ geo_id and geo_name. This is a shortcut for \code{esios_indicators("1001")} with some parsing. } \examples{ +\donttest{ e <- esios_pvpc() } +} \seealso{ \code{\link[=esios_indicators]{esios_indicators()}} }