Retrieve the espn_s2 cookie from global options or an environment variable.
ffl_cookie(cookie = getOption("fflr.cookie"))The espn_s2 string. Defaults to getOption("fflr.cookie")
and then Sys.getenv("ESPN_S2").
The cookie as a character string, or NULL if none is set.
The leagueHistory endpoint requires a cookie from a signed-in ESPN session.
Rather than passing it to every call, the cookie can be set once as the
fflr.cookie option or the ESPN_S2 environment variable. The cookie is
found in your browser's developer tools after signing into ESPN and should be
copied exactly, including any percent-encoded characters.
ffl_cookie("abc123")
#> [1] "abc123"