I'm in the process of writing a blog post that queries an API without an associated R package. Because there's no associated R package, I'm using the
httr GET function which requires my API key to be in the string format. My question is, how do I keep my API key private so it doesn't show up in my website's public GitHub repository?
I'm familiar with caching API keys using
options( ) as in
options(tigris_use_cache = TRUE) for the
tidycensus package but not sure how/whether to implement this in rmarkdown/blogdown for the API I linked to above. I haven't been able to find much help from Googling so any insight/tips would be greatly appreciated.