A demo API package created by apitools
devtools::document()
library(apiPKG)
api_call("somethingcool")
## [1] "https://api.PKG.com/v1.0/somethingcool"
api_call("articles/headlines")
## [1] "https://api.PKG.com/v1.0/articles/headlines"
api_call("articles/headlines", n = 500, filter = "en")
## [1] "https://api.PKG.com/v1.0/articles/headlines?n=500&filter=en"
api_call(
"articles/headlines",
n = 500,
filter = "en",
token = apiPKG_token()
)
## [1] "https://api.PKG.com/v1.0/articles/headlines?n=500&filter=en&token=thisistheapikeyiwasprovided"
rurl <- api_call(
"articles/headlines",
n = 500,
filter = "en",
token = apiPKG_token()
)
r <- httr::GET(rurl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.