1
0
Fork 0
mirror of https://github.com/sensebox/opensensmapr synced 2025-02-23 07:53:58 +01:00
opensensmapR/man/osem_box.Rd

45 lines
1.3 KiB
Text
Raw Permalink Normal View History

2017-08-14 18:13:20 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/box.R
\name{osem_box}
\alias{osem_box}
\title{Get a single senseBox by its ID}
\usage{
2018-05-25 17:17:29 +02:00
osem_box(boxId, endpoint = osem_endpoint(), cache = NA)
2017-08-14 18:13:20 +02:00
}
\arguments{
\item{boxId}{A string containing a senseBox ID}
\item{endpoint}{The URL of the openSenseMap API instance}
2018-05-25 17:17:29 +02:00
\item{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.}
2017-08-14 18:13:20 +02:00
}
\value{
A \code{sensebox data.frame} containing a box in each row
}
\description{
Get a single senseBox by its ID
}
\examples{
2018-05-25 17:17:29 +02:00
\donttest{
# 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')
2017-08-14 18:13:20 +02:00
2018-05-25 17:17:29 +02:00
# 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())
}
2017-08-14 18:13:20 +02:00
}
\seealso{
\href{https://docs.opensensemap.org/#api-Measurements-findAllBoxes}{openSenseMap API documentation (web)}
\code{\link{osem_phenomena}}
2017-11-30 01:05:44 +01:00
\code{\link{osem_boxes}}
2018-05-25 17:17:29 +02:00
\code{\link{osem_clear_cache}}
2017-08-14 18:13:20 +02:00
}