From 65130b2cc30fa137bb435e8bcda51632ca9f5537 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Thu, 20 Nov 2025 12:35:11 -0800 Subject: [PATCH 1/2] enh: meta endpoints bypass cache by default --- R/endpoints.R | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/R/endpoints.R b/R/endpoints.R index 2c3a3148..7c3d46bb 100644 --- a/R/endpoints.R +++ b/R/endpoints.R @@ -885,6 +885,8 @@ pub_covid_hosp_state_timeseries <- function( #' available, the geographic levels at which they are reported, and etc. #' #' @param fetch_args [`fetch_args`]. Additional arguments to pass to `fetch()`. +#' By default, the cache is refreshed (since we anticipate the user will want +#' to see the latest metadata). #' #' @return [`tibble::tibble`] #' @@ -896,7 +898,7 @@ pub_covid_hosp_state_timeseries <- function( #' @seealso [pub_covidcast()],[covidcast_epidata()] #' @keywords endpoint #' @export -pub_covidcast_meta <- function(fetch_args = fetch_args_list()) { +pub_covidcast_meta <- function(fetch_args = fetch_args_list(refresh_cache=TRUE)) { create_epidata_call( "covidcast_meta/", list(), @@ -1466,12 +1468,13 @@ pub_fluview_clinical <- function( #' } #' #' @param fetch_args [`fetch_args`]. Additional arguments to pass to `fetch()`. +#' Set `refresh_cache=TRUE` to force a refresh of the cache. #' #' @return [`tibble::tibble`] #' @seealso [`pub_fluview()`] #' @keywords endpoint #' @export -pub_fluview_meta <- function(fetch_args = fetch_args_list()) { +pub_fluview_meta <- function(fetch_args = fetch_args_list(refresh_cache=TRUE)) { create_epidata_call( "fluview_meta/", list(), @@ -1746,11 +1749,12 @@ pub_kcdc_ili <- function( #' } #' @param auth string. Restricted access key (not the same as API key). #' @param fetch_args [`fetch_args`]. Additional arguments to pass to `fetch()`. +#' Set `refresh_cache=TRUE` to force a refresh of the cache. #' @return [`list`] #' @seealso [`pvt_norostat()`] #' @keywords endpoint #' @export -pvt_meta_norostat <- function(auth, fetch_args = fetch_args_list()) { +pvt_meta_norostat <- function(auth, fetch_args = fetch_args_list(refresh_cache=TRUE)) { assert_character_param("auth", auth, len = 1) create_epidata_call( @@ -1765,11 +1769,12 @@ pvt_meta_norostat <- function(auth, fetch_args = fetch_args_list()) { #' API docs: #' #' @param fetch_args [`fetch_args`]. Additional arguments to pass to `fetch()`. +#' Set `refresh_cache=TRUE` to force a refresh of the cache. #' #' @return [`list`] #' @keywords endpoint #' @export -pub_meta <- function(fetch_args = fetch_args_list()) { +pub_meta <- function(fetch_args = fetch_args_list(refresh_cache=TRUE)) { create_epidata_call("meta/", list(), only_supports_classic = TRUE) %>% fetch(fetch_args = fetch_args) } From 55cc55bd7271ef52c8eaa96d2e1280a57e51691d Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Thu, 20 Nov 2025 13:00:10 -0800 Subject: [PATCH 2/2] doc: doc --- DESCRIPTION | 2 +- NEWS.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index f818e50d..4bda5d9b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: epidatr Title: Client for Delphi's 'Epidata' API -Version: 1.2.2 +Version: 1.2.3 Authors@R: c( person("Logan", "Brooks", , "lcbrooks@andrew.cmu.edu", role = "aut"), person("Dmitry", "Shemetov", , "dshemeto@andrew.cmu.edu", role = "aut"), diff --git a/NEWS.md b/NEWS.md index c2630125..b1ceff86 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ + + +# epidatr 1.2.3 + +## Changes + +- Make sure `*_meta` functions bypass the cache by default. + # epidatr 1.2.2 ## Changes