save | R Documentation |
Update NAMC database data via the API. Upsert routines are used.
save(
api_endpoint,
args = list(),
api = .pkgenv$api,
append_metadata = FALSE,
...
)
api_endpoint |
string A NAMC API endpoint name. Available endpoints can be found via the |
args |
a list of named arguments to pass to the API endpoint. Can also be passed individually in ... namc_api get_endpoints method. |
api |
namc_api An instance of the namc_api class having a default of a pre-initialized package object |
... |
named arguments to merge with data and pass to the API endpoint. |
data.frame An identifier of an inserted record OR a data.frame containing the modified record
info()
,browseVignettes("NAMC-API-Overview")
Other query functions:
query()
,
raw_query()
site = list(
station = 'myStation',
lat = 45.555,
long = -123.555,
...
)
sites = NAMCr::save(
api_endpoint = 'updateSite',
args = site
)
# Alternative
sites = NAMCr::save(
api_endpoint = 'updateSite',
station = 'myStation',
lat = 45.555,
long = -123.555
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.