.onAttach <- function(libname, pkgname) {
packageStartupMessage("BNM Open API")
packageStartupMessage("Visit https://apikijangportal.bnm.gov.my/disclaimer to view disclaimers.")
tryCatch(
packageStartupMessage(bnm_api("/welcome")$content$api),
error = function(e) {
"Cannot access API. Please check your internet connection."
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.