dsc_authtoken: Login to the drugshortagescanada.ca web API

Description Usage Arguments Details Value

View source: R/drugshortagescanada.R

Description

This function logs in to the DSC web API and stores the temporary authentication token so that it can be used by other API calls.

Usage

1
dsc_authtoken(email, password, reuse_authtoken = F)

Arguments

email

Your email address used to log into the DSC

password

Your password

reuse_authtoken

If an authentication token has already been retrieved this session, then return it without logging in again via the API

Details

You shouldn't usually need to call this function directly, as dsc_search() will automatically do so.

The username and password can be passed into the function explicitly, or can be set via environment variables in .Renviron, or directly like so:

Sys.setenv('dsc.email' = 'bill.gates@microsoft.com') Sys.setenv('dsc.password' = 'passw0rd!')

dsc_login()

Value

authentication token


pipitone/rdrugshortages documentation built on May 5, 2020, 3:41 a.m.