Skip to contents

Check if R has access to resources at https://api.finna.fi/api/v1/?openapi. This function tests whether R can successfully connect to the Finna API by attempting to download from the API's OpenAPI specification.

Usage

check_api_access()

Value

a logical indicating if the API is accessible (TRUE) or not (FALSE).

Examples

if (FALSE) { # \dontrun{
  # Check if the API is accessible
  access <- check_api_access()
  if (access) {
    message("Finna API is accessible")
  } else {
    message("Finna API is not accessible")
  }
} # }