Skip to contents

The get_shark_options function retrieves available search options from the SHARK database hosted by SMHI. It sends a GET request to the SHARK API and returns the results as a structured data.frame.

Usage

get_shark_options(prod = TRUE, unparsed = FALSE)

Arguments

prod

Logical. Query against PROD or TEST (SMHI internal) server. Default is TRUE (PROD).

unparsed

Logical. If TRUE, returns the complete JSON output as list. Defaults to FALSE.

Value

A data.frame containing the available search options from the SHARK API.

Details

This function sends a GET request to the SHARK API options endpoint to retrieve available search filters and options for querying the database. The API returns data in JSON format, which is then parsed into a data.frame.

See also

Examples

if (FALSE) { # \dontrun{
  # Retrieve available search options
  shark_options <- get_shark_options()
  View(shark_options)

  # View available datatypes
  dataTypes <- shark_options$dataTypes
  print(dataTypes)
} # }