fse_ak: FSE access keys

Description Usage Arguments Details Value

View source: R/fse_ak.R

Description

FSE access keys give access to the data feeds. For a more complete description see chapter "Data Feeds" of FSE Operations Guide. The package can work with both the personal key (PK) or the service key (SK). Functions below allow for setting and retrieving these access keys.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
fse_ak(use = getOption("fse.key_type", "auto"))

fse_pk()

fse_sk()

set_fse_pk(key)

set_fse_sk(key)

## S3 method for class 'fse_key'
print(x, ...)

as_fse_key(x, ...)

## S3 method for class 'character'
as_fse_key(x, type = c("personal", "service"))

## Default S3 method:
as_fse_key(x, ...)

Arguments

use

type of key to use. Expects "service", "personal" or "auto" (default).

key

character scalar with FSE key

x

for the print() method, object inheriting from class "fse_key". For as_fse_key object coercible to character interpreted as FSE access key.

...

other arguments passed to/from other methods

type

type of the key supplied, one of "personal" or "service"

Details

For fse_ak() the type of key returned depends on use. If it is "auto" (the default) the function looks for service key first, personal second and throws error if none is found.

Function as_fse_key() stores an FSE access key together with the information whether it is a personal key or service key.

Value

Function fse_ak() returns the access key or throws an error if non is found.

Functions fse_sk() and fse_pk() return the FSE access key of specified type or NA if it is not available.

Functions set_fse_pk(), set_fse_sk() return invisibly TRUE or FALSE if the key was succesfully set, just like Sys.setenv().


rfse/fse documentation built on Jan. 25, 2022, 5:54 a.m.