xemwebe / yahoo_finance_api

Simple wrapper to yahoo! finance API to retrieve latest quotes and end-of-day quote histories
Apache License 2.0
64 stars 29 forks source link

blocking features, wasm compatibility #3

Closed celaus closed 3 years ago

celaus commented 3 years ago

Too much had changed 😄

supersedes & closes PR #2

celaus commented 3 years ago

WASM compatibility actually didn't need a special code section, reqwest has that built in :)

celaus commented 3 years ago

Quick explanation:

I tried to minimize any code duplication, but unless we use macros to define the functions there will be some duplication. However, I tried to externalize most things (e.g. the URL paths, the send function) so the actual sync/async implementations are effectively only putting together the URL. Fortunately, reqwest comes with a blocking feature as well, so we can rely on this and don't have to mess with threadpools and executors 😄

xemwebe commented 3 years ago

Looks great!