The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Retrieve data from kintone via its API. kintone is an enterprise application platform.
Stable CRAN version
install.packages("kntnr")
Dev version
::install_github("yutannihilation/kntnr") devtools
To use kintone API, kntnr needs the following environmental variables.
KNTN_URL
: kintone URLKNTN_AUTH_TYPE
: authentication type (password or
token)KNTN_AUTH
: API token or BASE64 encoded login name and
passwordkntn_set_auth()
sets these environmental variables
interactively.
library(kntnr)
# password-based authentication
kntn_set_auth()
# token-based authentication
kntn_set_auth(auth_type = "token")
To set another information, run kntn_set_auth()
with
overwrite = TRUE
.
kntn_set_auth(overwrite = TRUE)
Or, unset the environmental variables by
kntn_unset_auth()
.
kntn_unset_auth()
You can define the environmental variables in .Renviron
,
which is loaded at the start of an R session. For more information, see
?Startup
.
= https://example.kintone.com/
KNTN_URL = token
KNTN_AUTH_TYPE = 1234567890 KNTN_AUTH
kntn_record()
gets a single record from the specified
kintone application. kntn_records()
retrieves multiple
records at once. If the number of records is more than
records_per_request (the default is 100), kntn_records()
automatically splits the request into smaller subrequests.
<- 10
app
# get a single record
<- kntn_record(app, id = 1)
d
# get records up to 1000 (default)
<- kntn_records(app)
d
# get records up to 5000 records at the latency of 500 records/request.
<- kntn_records(app, max_records = 5000, records_per_request = 500L) d
Some types like SUBTABLE are converted as nested data.frame. You can
unnest them by using kntn_unnest()
.
kntn_unnest(d)
kntn_file()
gets a file from kintone API and try to
parse it with httr::content()
. If you want to parse it by
yourself, specify as = "raw"
or
as = "text"
.
<- kntn_record(app, id = 1)
d
<- kntn_file(fileKey = x$Attachment[[1]]$fileKey[1]) f
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.