Module: CurrentPrice::Yahoo::Client::Quote
- Included in:
- CurrentPrice::Yahoo::Client
- Defined in:
- lib/current-price/yahoo/client/quote.rb
Instance Method Summary collapse
Instance Method Details
#quote(ticker) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/current-price/yahoo/client/quote.rb', line 6 def quote(ticker) url = 'https://query.yahooapis.com/v1/public/yql?q=' url += URI.encode("SELECT * FROM yahoo.finance.quotes WHERE symbol IN ('#{ticker}')") url += '&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=' quote_serializer( request( url ) ) end |