joshuaulrich / quantmod

Quantitative Financial Modelling Framework
http://www.quantmod.com/
GNU General Public License v3.0
798 stars 219 forks source link

simplified signature and implementation #344

Closed ethanbsmith closed 2 years ago

ethanbsmith commented 2 years ago

simplified function signature and implementation to better support subsequent maintenance should not be breaking change as existing usage of data.type is handled by ...

closes #343

ethanbsmith commented 2 years ago

just realized that the the whole section below can be further simplified to probably 1 line. Ill do some testing and add another commit

 h <- curl::new_handle()
    curl::handle_setheaders(h, Authorization = paste("Token", api.key))
    response <- curl::curl_fetch_memory(URL, h)
    response.data <- rawToChar(response$content)
    stock.data <- read.csv(text=response.data, as.is=TRUE, header=TRUE)
joshuaulrich commented 2 years ago

Close call... I was just about to merge! Let me know when you think this is ready.

ethanbsmith commented 2 years ago

should be gtg

joshuaulrich commented 2 years ago

Awesome, thanks!