Skip to contents

Reports whether YouTube client environment variables are set (or, if arguments are provided, check that they have characters).

Usage

yt_has_client_envvars(
  client_id = Sys.getenv("YOUTUBE_CLIENT_ID"),
  client_secret = Sys.getenv("YOUTUBE_CLIENT_SECRET")
)

Arguments

client_id

A Google Cloud OAuth 2.0 client ID. We recommend you save it as an environment variable, YOUTUBE_CLIENT_ID.

client_secret

A Google Cloud OAuth 2.0 client secret. We recommend you save it as an environment variable, YOUTUBE_CLIENT_SECRET.

Value

A logical indicating whether the variables are available.

Examples

yt_has_client_envvars()
#> [1] TRUE
yt_has_client_envvars("an_id_string", "a_secret_string")
#> [1] TRUE