get_todays_goldprice: Retrieves the gold price that was published today.

Description Usage Details Value See Also Examples

View source: R/endpoint_goldprice.R

Description

Retrieves the gold price that was published today.

Usage

1

Details

If today's data is not available the API will return a 404 Not found error. In that case the function will return an error with an appropriate message.

Value

nbp_api_response object containing today's gold price.

See Also

https://api.nbp.pl/#cenyZlota

Other goldprice: get_current_goldprice(), get_goldprice_from_interval(), get_goldprice_from(), get_last_n_goldprices()

Examples

1
2
3
4
5
6
7
8
  tryCatch({
      ## Fetch todays gold price
      response <- get_todays_goldprice()
      ## Preview response content
      response$content
    },
    error = function(e) message(e)
  )

rnbp documentation built on June 7, 2021, 9:07 a.m.