Learn R Programming

traktok (version 0.1.1)

auth_check: Check whether you are authenticated

Description

[Works on: Both]

Check if the necessary token or cookies are stored on your computer already. By default, the function checks for the authentication of the research and hidden API. To learn how you can authenticate, see the research API vignette or hidden API vignette. You can also view these locally with vignette("research-api", package = "traktok") and vignette("unofficial-api", package = "traktok").

Usage

auth_check(research = TRUE, hidden = TRUE, silent = FALSE, fail = FALSE)

Value

logical vector (invisible)

Arguments

research, hidden

turn check on/off for the research or hidden API.

silent

only return if check(s) were successful, no status on the screen

fail

fail if even basic authentication for the hidden API is missing.

Examples

Run this code
auth_check()

au <- auth_check()
if (isTRUE(au["research"])) {
  message("Ready to use the research API!")
}
if (isTRUE(au["hidden"])) {
  message("Ready to use all function of unofficial the API!")
}

Run the code above in your browser using DataLab