Class: StocksInfo::Stocktwits

Inherits:
Object
  • Object
show all
Defined in:
lib/stocks-info/stocktwits.rb

Constant Summary collapse

"https://api.stocktwits.com/api/2/trending/symbols.json"
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ticker) ⇒ Stocktwits

Returns a new instance of Stocktwits.



5
6
7
8
9
# File 'lib/stocks-info/stocktwits.rb', line 5

def initialize(ticker)
    @url = "https://stocktwits.com/symbol/#{ticker}"
    @trending_url = "https://api.stocktwits.com/api/2/trending/symbols.json"
    @trending_tickers = []
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/stocks-info/stocktwits.rb', line 3

def url
  @url
end

Class Method Details



18
19
20
# File 'lib/stocks-info/stocktwits.rb', line 18

def self.trending_tickers
    @@trending_tickers
end


14
15
16
# File 'lib/stocks-info/stocktwits.rb', line 14

def self.trending_url
    @@trending_url
end