blob: 7fdfc1be6f09ef0b6f5d1f37ddc67b1cf9689a94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
}
}
|