fmi_api: FMI API

View source: R/fmi_api.R

fmi_apiR Documentation

FMI API

Description

Requests to FMI API.

Usage

fmi_api(request, storedquery_id = NULL, ...)

Arguments

request

character request type of either DescribeStoredQueries or getFeature.

storedquery_id

character id of the stored query id. If request is getFeature, then storedquery_id must be provided and otherwise it's ignored.

...

stored query specific parameters. NOTE: it's up to the high-level functions to check the validity of the parameters.

Details

Make a request to the FMI API. The base url is opendata.fmi.fi/wfs?service=WFS&version=2.0.0 to which other components defined by the arguments are appended.

This is a low-level function intended to be used by other higher level functions in the package.

Note that GET requests are used using httpcache meaning that requests are cached. If you want clear cache, use httpcache::clearCache(). To turn the cache off completely, use httpcache::cacheOff()

Value

fmi_api (S3) object with the following attributes:

content

XML payload.

path

path provided to get the resonse.

response

the original response object.

Author(s)

Joona Lehtomäki joona.lehtomaki@iki.fi

Examples

  # List stored queries
  fmi_api(request = "DescribeStoredQueries")


rOpenGov/fmi2 documentation built on April 30, 2024, 4:37 a.m.