osem_box: Get a single senseBox by its ID

osem_boxR Documentation

Get a single senseBox by its ID

Description

Get a single senseBox by its ID

Usage

osem_box(boxId, endpoint = osem_endpoint(), cache = NA)

Arguments

boxId

A string containing a senseBox ID

endpoint

The URL of the openSenseMap API instance

cache

Whether to cache the result, defaults to false. If a valid path to a directory is given, the response will be cached there. Subsequent identical requests will return the cached data instead.

Value

A sensebox data.frame containing a box in each row

See Also

openSenseMap API documentation (web)

osem_phenomena

osem_boxes

osem_clear_cache

Examples

## Not run: 
  # get a specific box by ID
  b = osem_box('57000b8745fd40c8196ad04c')

  # get a specific box by ID from a custom (selfhosted) openSenseMap API
  b = osem_box('51030b8725fd30c2196277da', 'http://api.my-custom-osem.com')

  # get a specific box by ID and cache the response, in order to provide
  # reproducible results in the future.
  b = osem_box('51030b8725fd30c2196277da', cache = tempdir())

## End(Not run)

sensebox/opensensmapR documentation built on March 12, 2023, 8:09 a.m.