Class: Radar::API::IndexService::Client
- Inherits:
-
Object
- Object
- Radar::API::IndexService::Client
- Includes:
- Thrift::Client
- Defined in:
- lib/radar/api/index_service.rb
Instance Method Summary collapse
- #price(symbol, date) ⇒ Object
- #price_change(symbol, start_date, end_date) ⇒ Object
- #prices(symbol, start_date, end_date) ⇒ Object
- #recv_price ⇒ Object
- #recv_price_change ⇒ Object
- #recv_prices ⇒ Object
- #send_price(symbol, date) ⇒ Object
- #send_price_change(symbol, start_date, end_date) ⇒ Object
- #send_prices(symbol, start_date, end_date) ⇒ Object
Instance Method Details
#price(symbol, date) ⇒ Object
31 32 33 34 |
# File 'lib/radar/api/index_service.rb', line 31 def price(symbol, date) send_price(symbol, date) return recv_price() end |
#price_change(symbol, start_date, end_date) ⇒ Object
46 47 48 49 |
# File 'lib/radar/api/index_service.rb', line 46 def price_change(symbol, start_date, end_date) send_price_change(symbol, start_date, end_date) return recv_price_change() end |
#prices(symbol, start_date, end_date) ⇒ Object
16 17 18 19 |
# File 'lib/radar/api/index_service.rb', line 16 def prices(symbol, start_date, end_date) send_prices(symbol, start_date, end_date) return recv_prices() end |
#recv_price ⇒ Object
40 41 42 43 44 |
# File 'lib/radar/api/index_service.rb', line 40 def recv_price() result = (Price_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'price failed: unknown result') end |
#recv_price_change ⇒ Object
55 56 57 58 59 |
# File 'lib/radar/api/index_service.rb', line 55 def recv_price_change() result = (Price_change_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'price_change failed: unknown result') end |
#recv_prices ⇒ Object
25 26 27 28 29 |
# File 'lib/radar/api/index_service.rb', line 25 def recv_prices() result = (Prices_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'prices failed: unknown result') end |
#send_price(symbol, date) ⇒ Object
36 37 38 |
# File 'lib/radar/api/index_service.rb', line 36 def send_price(symbol, date) ('price', Price_args, :symbol => symbol, :date => date) end |
#send_price_change(symbol, start_date, end_date) ⇒ Object
51 52 53 |
# File 'lib/radar/api/index_service.rb', line 51 def send_price_change(symbol, start_date, end_date) ('price_change', Price_change_args, :symbol => symbol, :start_date => start_date, :end_date => end_date) end |
#send_prices(symbol, start_date, end_date) ⇒ Object
21 22 23 |
# File 'lib/radar/api/index_service.rb', line 21 def send_prices(symbol, start_date, end_date) ('prices', Prices_args, :symbol => symbol, :start_date => start_date, :end_date => end_date) end |