ropenscilabs / deposits

R Client for access to multiple data repository services
https://docs.ropensci.org/deposits/
Other
37 stars 3 forks source link

Feature Request: use env variable `^ZENODO$` for Zotero token #95

Open rkrug opened 9 months ago

rkrug commented 9 months ago

When getting the API token from the environmental variables,

https://github.com/ropenscilabs/deposits/blob/bc3ca40a678178eee012433d43829dc9dbd95754/R/tokens.R#L23-L24

https://github.com/ropenscilabs/deposits/blob/bc3ca40a678178eee012433d43829dc9dbd95754/R/tokens.R#L30

looks for all environmental variables with zenodo and not sandbox, which works fine when having only one API key for Zenodo - I have two, one for read only and one for writing. Could I suggest to check for exactly the names equals ZENODO_SANDBOX and ZENODO?

mpadge commented 9 months ago

Sure, could you please PR improvements to that? And then also add explicit instructions to the setup vignette. Thanks

rkrug commented 9 months ago

OK - Will do so beginning of next week. Please feel free to assign it to me.