MyNixOS website logo
Description

R Client for 'kintone' API.

Retrieve data from 'kintone' (<https://www.kintone.com/>) via its API. 'kintone' is an enterprise application platform.

kntnr

Travis-CI Build Status AppVeyor Build Status CRAN_Status_Badge

Retrieve data from kintone via its API. kintone is an enterprise application platform.

Installation

Stable CRAN version

install.packages("kntnr")

Dev version

devtools::install_github("yutannihilation/kntnr")

Usage

Authentication

To use kintone API, kntnr needs the following environmental variables.

  • KNTN_URL: kintone URL
  • KNTN_AUTH_TYPE: authentication type (password or token)
  • KNTN_AUTH: API token or BASE64 encoded login name and password

kntn_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()

For non-interactive use

You can define the environmental variables in .Renviron, which is loaded at the start of an R session. For more information, see ?Startup.

KNTN_URL = https://example.kintone.com/
KNTN_AUTH_TYPE = token
KNTN_AUTH = 1234567890

Record API

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.

app <- 10

# get a single record
d <- kntn_record(app, id = 1)

# get records up to 1000 (default)
d <- kntn_records(app)

# get records up to 5000 records at the latency of 500 records/request.
d <- kntn_records(app, max_records = 5000, records_per_request = 500L)

Some types like SUBTABLE are converted as nested data.frame. You can unnest them by using kntn_unnest().

kntn_unnest(d)

File API

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".

d <- kntn_record(app, id = 1)

f <- kntn_file(fileKey = x$Attachment[[1]]$fileKey[1])
Metadata

Version

0.4.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows