brickset_auth: Authenticate with the brickset.com api

Description Usage Arguments Value Examples

View source: R/scrape_brickset.R

Description

Passes username, password, and API key to brickset API, receives a userHash in response. The userHash is stored in a global .brickset_hash variable if it is retrieved successfully; the function returns true for success and false for failure.

Usage

1
2
brickset_auth(key = brickset_key(), username = brickset_username(),
  password = brickset_password(), cache = T)

Arguments

key

API key. If NULL, the function looks for .brickset_key in the environment

username

username. If NULL, the function looks for .brickset_username in the environment

password

password. If NULL, the function looks for .brickset_password in the environment

cache

cache key, username, password for later (default TRUE)

Value

TRUE if authentication succeeds, FALSE otherwise.

Examples

1
2
3
4
5
## Not run: 
brickset_auth()
brickset_auth(key = "your-key", username = "your_username", password = "hunter2")

## End(Not run)

srvanderplas/LegoR documentation built on Nov. 5, 2019, 9:17 a.m.