Learn R Programming

finna (version 0.1.1)

check_api_access: Check Access to the Finna API

Description

This function tests whether R can successfully connect to the Finna API by downloading the OpenAPI specification from https://api.finna.fi/api/v1/?openapi. It returns a logical value indicating the accessibility of the API.

Usage

check_api_access()

Arguments

Value

A logical value:

  • TRUE: The API is accessible.

  • FALSE: The API is not accessible.

Examples

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

Run the code above in your browser using DataLab