neuromorpho_is_api_healthy: Check whether the neuromorpho.org API is up and running

View source: R/fetch.R

neuromorpho_is_api_healthyR Documentation

Check whether the neuromorpho.org API is up and running

Description

Test that the base neuromorpho.org API url, http://neuromorpho.org/api, can be reached. The API provides access to the neuron information, morphometry data and literature via three main endpoints using conventional HTTP requests. These endpoints are used by function in this package to read neurons from the repository, get meta information associated with those neurons, and perform limited searches of the literature describing neuronal morphologies.

Usage

neuromorpho_is_api_healthy(neuromorpho_url = "http://neuromorpho.org", ...)

Arguments

neuromorpho_url

the base URL for querying the neuromorpho database, defaults to http://neuromorpho.org

...

methods passed to neuromorpho_async_req, or in some cases, neuromorphr:::neuromorpho_fetch

Details

Checks to see whether status the neuromorpho.org API is 'UP' at http://neuromorpho.org/api/health

Value

TRUE if the API can be reached, FALSE with a warning, if not

See Also

neuromorpho_search, neuromorpho_read_neurons, neuromorpho_neurons_info

Examples

## Not run: 
## Check if the neuromorpho API is healthy
if(neuromorpho_is_api_healthy()){
     message("We can talk to neuromorpho.org!")
}else{
     message("Oh dear")
}

## End(Not run)

jefferislab/neuromorphr documentation built on April 25, 2023, 9:07 p.m.