#' Get Weather Data From Tomorrow.io
#'
#' @return
#' @export
get_weather <- function() {
api_url <- "https://api.tomorrow.io/v4/locations"
## Make the request to get data from Tomorrow.io
request <- httr::GET(
url = api_url
)
if (request$status != 200) {
rlang::abort("Request provided returned an invalid status code. Please retry your request!")
}
weather_content <- request %>% httr::content()
## This returns no locations because we need to first create a location and provide the coordinates of that location. Then we can query it.
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.