Description Usage Arguments Source Examples
post_config
submits JSON configuration lists.
1 2 3 4 |
config |
a configuration list according to the API definition |
... |
additional parameters supplied to |
url |
the POST API endpoint offering |
show |
boolean print the created JSON object |
path |
write the JSON object to a file on disk |
auto_unbox |
automatically ‘unbox’ all atomic vectors of length 1 (see
|
null |
how to encode NULL values within a list: must be one of 'null' or
'list' (see |
httr
was created by Hadley Wickham, see
https://cran.r-project.org/web/packages/httr/index.html;
jsonlite
was created by Jeroen Ooms et al., see
https://cran.r-project.org/web/packages/jsonlite/index.html.
1 2 3 4 5 6 7 8 9 10 | query <- "KEI/PRINTO01+PRMNTO01.AUS+AUT+BEL+CAN+CHL+CZE+DNK+EST+FIN+FRA.GP.A/all?startTime=2015&endTime=2015"
chartconfig <- create_config(sdmx_data_query = query, type = "BarChart", logo = FALSE)
post_config(config = chartconfig, url = "http://stats.oecd.org", response = TRUE)
## write to disk for debugging
outfile <- tempfile(pattern = "chartconfig_", fileext = ".json")
post_config(config = chartconfig, path = outfile)
filecon <- file(outfile)
readLines(con = filecon)
close(filecon)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.