read_config: Set API environment variables from a configuration file

Description Usage Arguments Details Value

View source: R/config_from_file.R

Description

The environment variable QUALTRICS_TOKEN should give an API token for authentication. QUALTRICS_SUBDOMAIN should give the subdomain(s) that precede qualtrics.com in your API URL. read_config sets these environment variables using the contents of a JSON-formatted configuration file.

Usage

1
2
read_config(path = path.expand("~/.qualtrics_api"), select = NULL,
  setenv = TRUE, verbose = FALSE)

Arguments

path

A file path.

select

Keys to select from the configuration file, optionally.

setenv

Whether to set the environment variables using the configuration file contents (the default), or not.

verbose

Whether to output the names of the environment variables read from the configuration file, or not (the default).

Details

An example configuration file:

{ "QUALTRICS_TOKEN": "secret_token", "QUALTRICS_SUBDOMAIN": "co1" }

Environment variables can be set during startup (recommended), interactively with Sys.setenv or through read_config.

Value

Invisibly returns the names of the environment variables read from the configuration file, after setting them as a side effect.


cloudyr/qualtrics documentation built on May 13, 2019, 8:21 p.m.