get_api_key: Find API Key for Elsevier

Description Usage Arguments Value Note Examples

View source: R/get_api_key.R

Description

Determines if option(elsevier_api_key) or option(elsevier_api_key_filename) is set. If not, it stops and returns an error. If so, returns the value.

Usage

1
2
3
get_api_key(api_key = NULL, error = TRUE)

have_api_key(api_key = NULL)

Arguments

api_key

Elsevier API key

error

Should the function error if api_key = NULL?

Value

API key

Note

You can either set the API key using option(elsevier_api_key) or have it accessible by api_key = Sys.getenv('Elsevier_API').

Examples

1
res = get_api_key(error = FALSE)

Example output



rscopus documentation built on Sept. 18, 2019, 1:03 a.m.