View source: R/endpoint_goldprice.R
get_last_n_goldprices | R Documentation |
Retrieves the last n gold prices.
get_last_n_goldprices(n)
n |
number of gold prices to retrieve. |
nbp_api_response object containing the last n gold prices.
Other goldprice:
get_current_goldprice()
,
get_goldprice_from()
,
get_goldprice_from_interval()
,
get_todays_goldprice()
tryCatch(
{
## Fetch the last 3 gold price values
response <- get_last_n_goldprices(3)
## Preview response content
response$content
},
error = function(e) message(e)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.