store_key: Store API key

Description Usage Arguments Details Value Note Author(s)

View source: R/key.R

Description

Store the ‘twelvedata’ API key

Usage

1
store_key(apikey)

Arguments

apikey

A character variable with the API key

Details

An API key is required to access the functionality offered by the ‘twelvedata’. This function can store a copy in a per-user configuration file. It relies on a the base R function R_user_dir which offers a per-user configuration directory for the package. No file or directory permissions are set explicitly or changed. As an alternative the key can also be set in the environment variable TWELVEDATA_API_KEY but doing so is the responsibility of the user.

Value

TRUE is return invisibly but the function is invoked for the side effect of storing the API key.

Note

This function requires R version 4.0.0 or later to utilise the per-user config directory accessor function. For older R versions, please use the alternate approach of storying the API in the environment variable TWELVEDATA_API_KEY.

Author(s)

Dirk Eddelbuettel


td documentation built on Jan. 27, 2022, 1:16 a.m.