R/get_last_data_update.R

Defines functions get_last_data_update

# Function to get the last date of update for any dataset on GitHub
# E.g of an endpoint: "https://api.github.com/repos/finddx/FINDCov19TrackerData/commits?path=processed%2Fdata_all.csv&page=1&per_page=1"
#' @export
get_last_data_update <- function(endpoint) {
  last_data_update <- curl::curl_fetch_memory(endpoint)$modified
  format(last_data_update, format= "%d %B %Y")
}
finddx/shinyfind documentation built on May 28, 2024, 8:37 p.m.