Module: IEX::Api::News

Defined in:
lib/iex/api/news.rb

Class Method Summary collapse

Class Method Details

.connection(symbol, range) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/iex/api/news.rb', line 8

def self.connection(symbol, range)
  IEX::Api.default_connection [
    symbol,
    'news',
    range ? 'last' : nil,
    range
  ].compact.join('/')
end

.get(symbol, range) ⇒ Object



4
5
6
# File 'lib/iex/api/news.rb', line 4

def self.get(symbol, range)
  connection(symbol, range).get.body
end