diff options
Diffstat (limited to 'man/cep_health.Rd')
| -rw-r--r-- | man/cep_health.Rd | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/man/cep_health.Rd b/man/cep_health.Rd new file mode 100644 index 0000000..7fdfc1b --- /dev/null +++ b/man/cep_health.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/api.R +\name{cep_health} +\alias{cep_health} +\title{Ask the API how it is, and which database it is serving} +\usage{ +cep_health(client = default_client()) +} +\arguments{ +\item{client}{A \code{\link[=cepis_client]{cepis_client()}}. Defaults to a shared client built with +the default configuration.} +} +\value{ +A \link{cepis_health}. +} +\description{ +Useful for two things: checking that the API answers, and knowing which +version of the DNE database is live. The database changes every two weeks. +} +\section{Conditions}{ + +An API reporting itself degraded is not a failure here — that arrives in +\code{status}, and checking health is exactly when you want the diagnosis +rather than an error. Network failures still signal \code{cepis_network_error}. +} + +\examples{ +\donttest{ +health <- cep_health() +health$ok +health$dne +} + +} |