Probe the data planes zot can reach
zotStatus.RdReports, one row per plane, whether the installed package, the API
credentials, the Web API and the local database are available from this
process, with the observation behind each verdict. The API probe is one
limit = 1 read of the personal library; the local probe opens the
database read-only and counts its items.
Usage
zotStatus(
config = NULL,
path = file.path(Sys.getenv("HOME"), "Zotero", "zotero.sqlite")
)Arguments
- config
A
zotConfig()object, orNULLto read the credentials from the environment.- path
Local database file, as in
zotLocalQuery().
Details
The credentials row never contains a credential: when a variable is
missing, detail names it and the file where it is defined, as
zotConfig() does. The local plane is advisory; the Web API is the plane
that writes are verified against.
Examples
Performer <- function(config, method, path, query, body, version) {
list(status = 200L, headers = list(`last-modified-version` = "9"),
body = list())
}
Config <- structure(
list(userID = "42", key = "example", apiBase = "https://example.invalid",
performer = Performer),
class = "zotConfig"
)
zotStatus(Config, path = tempfile())
#> plane available
#> <char> <lgcl>
#> 1: package TRUE
#> 2: credentials TRUE
#> 3: api TRUE
#> 4: local FALSE
#> detail
#> <char>
#> 1: zot 0.5.0
#> 2: configuration supplied
#> 3: HTTP 200; library version 9
#> 4: local database not found: /tmp/RtmpicnWu8/file3fb331164300