#' contextR
#' @name create_darksky_api_call
#' @export
#' @param DARK_SKY_API_KEY class: string
#' @param lat class: numeric
#' @param lng class: numeric
#' @examples
#' create_darksky_api_call(DARK_SKY_API_KEY, lat, lng, ts)
create_darksky_api_call <- function(DARK_SKY_API_KEY, lat, lng, ts) {
base_call = "https://api.darksky.net/forecast/"
var_call = paste0("/", lat, ",", lng, ",", ts)
api_call = paste0(base_call, DARK_SKY_API_KEY, var_call)
return(api_call)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.