Skip to contents

Sets the API key for accessing the WaniKani API. The key can be provided directly or will be read from the WANIKANI_API_KEY environment variable.

Usage

wk_set_api_key(api_key = NULL)

Arguments

api_key

Character string containing your WaniKani API key. If NULL, will attempt to read from WANIKANI_API_KEY environment variable.

Value

Invisibly returns TRUE if successful.

Examples

if (FALSE) { # \dontrun{
# Set API key directly
wk_set_api_key("your-api-key-here")

# Or set via environment variable
Sys.setenv(WANIKANI_API_KEY = "your-api-key-here")
wk_set_api_key()
} # }