# NOT RUN {
# set KNTN_URL, KNTN_AUTH and KNTN_AUTH_TYPE interactively.
# By default, auth_type is password.
kntn_set_auth()
Sys.getenv(c("KNTN_URL", "KNTN_AUTH", "KNTN_AUTH_TYPE"))
# This will return `X-Cybozu-Authorization` header.
kntn_get_authorization_header()
# Clear environmental variables before trying to use another set of authorization info.
kntn_unset_auth()
kntn_set_auth(auth_type = "token")
# This will return `X-Cybozu-API-Token` header.
kntn_get_authorization_header()
# To avoid interaction, set these environmental variables manually.
Sys.setenv("KNTN_URL" = "https://example.cybozu.com/")
Sys.setenv("KNTN_AUTH" = "abcdefg")
Sys.setenv("KNTN_AUTH_TYPE" = "token")
# }
Run the code above in your browser using DataLab