Skip to contents

Fetch metadata from the ANSES online map page, including the official update date displayed on the page when it can be parsed.

Usage

get_tiger_mosquito_colonisation_metadata(
  page = NULL,
  timeout = 60,
  max_retries = 3,
  retry_delay = 5,
  user_agent = NULL
)

Arguments

page

Optional pre-fetched HTML page source code (as a character vector of lines or a single string). If NULL (the default), the page will be downloaded automatically.

timeout

Connection timeout in seconds when downloading the page. Default is 60.

max_retries

Maximum number of download attempts. Default is 3.

retry_delay

Base delay in seconds between retries (exponential backoff with jitter). Default is 5.

user_agent

Custom User-Agent header string. Defaults to alboFr/<version> (R <version>; <platform>).

Value

A named list with source_url, source_official_update_date, and fetched_at.

Examples

if (FALSE) { # \dontrun{
# Fetch metadata directly
meta <- get_tiger_mosquito_colonisation_metadata()

# Reuse a pre-fetched page
page_html <- fetch_tiger_mosquito_page()
meta <- get_tiger_mosquito_colonisation_metadata(page = page_html)
} # }