Module: YahooStocks::Endpoint

Extended by:
URI::Escape, Common
Included in:
YahooStocks, Quotes
Defined in:
lib/yahoo_stocks/endpoint.rb,
lib/yahoo_stocks/endpoint/tags.rb

Defined Under Namespace

Modules: Tags

Constant Summary collapse

ENDPOINT =
'http://download.finance.yahoo.com/d/quotes.csv?'
FORMAT =
[:symbol, :last_trade_price_only, :change, :previous_close]

Constants included from Tags

Tags::TAGS

Class Method Summary collapse

Class Method Details

.compose_quotes(symbols, opts = nil) ⇒ Object



13
14
15
16
17
18
# File 'lib/yahoo_stocks/endpoint.rb', line 13

def self.compose_quotes(symbols, opts = nil)
  format = get_format(opts[:format] || FORMAT)
  symbols = get_values(symbols)
  uri = get_uri(format, s: symbols)
  URI.parse(uri)
end