Closed sketchkey closed 2 years ago
Hi @sketchkey, thanks for posting an issue! For consistency, we should probably include the key
argument in all examples. Most functions have a default of key = gfw_auth()
, however, so they should work without specifying key
so long as you've added your API token to your .Renviron
file as described in the Authorization section of the README. Did you do that?
Hi @sketchkey, thanks for posting an issue! For consistency, we should probably include the
key
argument in all examples. Most functions have a default ofkey = gfw_auth()
, however, so they should work without specifyingkey
so long as you've added your API token to your.Renviron
file as described in the Authorization section of the README. Did you do that?
Completely agree with the consistency idea — I have since added the API token to .Renviron (I was just being lazy when initially playing around with it 😅). Again, this package is awesome and will definitely be using/recommending this to folks for future projects!
@sketchkey Cool, just making sure it worked in that context. Thanks for the PR and glad you're finding the package useful!
Hi @sketchkey, thanks for posting an issue! For consistency, we should probably include the
key
argument in all examples. Most functions have a default ofkey = gfw_auth()
, however, so they should work without specifyingkey
so long as you've added your API token to your.Renviron
file as described in the Authorization section of the README. Did you do that?
Hey @tclavelle — just following up on this as I had a colleague who was having issues getting the GFW token in their .Renviron file to work. It looks like if you name the token as "GFW_token"
(with quotations per the Authorisation section), Sys.getenv
doesn't find it, and calling the created key
objects just gives an empty vector: ([1] ""
).
Tokens named without quotations work fine (GFW_TOKEN = "PASTE_YOUR_TOKEN_HERE"
)
I've only tested this by editing the .Renviron file for my current project (e.g. usethis::edit_r_environ("project")
, but guessing this issue applies to both global and local edits. Have not made a pull request in case I'm missing something obvious, so feel free to let me know either way!
"key" argument missing for get_vessel_info & get_event( doesn't work for me without it) — thanks for making the package!!