load_credentials: Load Credentials.

Description Usage Arguments Details Value Examples

View source: R/get-token.R

Description

load_credentials loads credential information from text file to use in calls to aWhere API

Usage

1
load_credentials(path_to_credentials, apiAddress = "api.awhere.com")

Arguments

path_to_credentials

absolute or relative path to the text file

apiAddress

Address of aWhere API to use. For advanced use only. Most users will not need to use this parameter (optional)

Details

This script creates loads a valid aWhere API token into memory to be used in making API calls. Instead of typing in the password and username manually and calling the get_token(uid,secret) function, you can store this information in a txt file in some arbitrary directory. The first line of the text file should be the provided uid/username, the second line should be the associated secret. A blank 3rd line should be inserted to prevent an error from being returned by R

Value

vector with uid and secret in positions 1, 2

Examples

1
## Not run: load_credentials("C:/aWhere/credentials/credentials.txt")

aWhereAPI/aWhere-R-Library documentation built on Nov. 5, 2021, 3:35 a.m.