A Apikey object has an api_key string and a key name string.
Methods
Inherited methods
NSSPAuth$get_api_data()
NSSPApikey$get_api_response()
Get API response
Examples
myProfile <- Apikey$new("abc1234567890")
url <- "https://httpbin.org/json"
api_response <- myProfile$get_api_response(url)NSSPApikey$get_api_graph()
Get API graph
Arguments
urla character of API URL
file_exta non-empty character vector giving the file extension. Default is
.png.
Examples
myProfile <- Apikey$new("abc1234567890")
url <- "https://httpbin.org/image/png"
api_data_graph <- myProfile$get_api_graph(url)
names(api_data_graph)
img <- png::readPNG(api_data_graph$graph)
grid::grid.raster(img)Examples
## ------------------------------------------------
## Method `NSSPApikey$get_api_response()`
## ------------------------------------------------
if (FALSE) { # \dontrun{
myProfile <- Apikey$new("abc1234567890")
url <- "https://httpbin.org/json"
api_response <- myProfile$get_api_response(url)
} # }
## ------------------------------------------------
## Method `NSSPApikey$get_api_graph()`
## ------------------------------------------------
if (FALSE) { # \dontrun{
myProfile <- Apikey$new("abc1234567890")
url <- "https://httpbin.org/image/png"
api_data_graph <- myProfile$get_api_graph(url)
names(api_data_graph)
img <- png::readPNG(api_data_graph$graph)
grid::grid.raster(img)
} # }