View source: R/algaebase_api_functions.R
check_algaebase_api | R Documentation |
Internal function to verify whether the AlgaeBase API is operational. It sends a request to a stable genus endpoint to confirm API availability.
check_algaebase_api(apikey = NULL, genus_id = 43375)
apikey |
A string. The API key for accessing the AlgaeBase API. Defaults to |
genus_id |
A numeric value. The unique genus ID used to test the API endpoint.
Default is |
This function performs a GET request to the AlgaeBase API using a stable genus ID to ensure that the API is accessible and that the provided API key is valid. It is used internally to prevent unnecessary queries when the API is unavailable.
A logical value: TRUE
if the API is operational, FALSE
otherwise.
## Not run:
# Check API status with an API key
check_algaebase_api(apikey = "your_api_key")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.