Class: Radar::API::IndexService::Processor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Processor
Defined in:
lib/radar/api/index_service.rb

Instance Method Summary collapse

Instance Method Details

#process_price(seqid, iprot, oprot) ⇒ Object



73
74
75
76
77
78
# File 'lib/radar/api/index_service.rb', line 73

def process_price(seqid, iprot, oprot)
  args = read_args(iprot, Price_args)
  result = Price_result.new()
  result.success = @handler.price(args.symbol, args.date)
  write_result(result, oprot, 'price', seqid)
end

#process_price_change(seqid, iprot, oprot) ⇒ Object



80
81
82
83
84
85
# File 'lib/radar/api/index_service.rb', line 80

def process_price_change(seqid, iprot, oprot)
  args = read_args(iprot, Price_change_args)
  result = Price_change_result.new()
  result.success = @handler.price_change(args.symbol, args.start_date, args.end_date)
  write_result(result, oprot, 'price_change', seqid)
end

#process_prices(seqid, iprot, oprot) ⇒ Object



66
67
68
69
70
71
# File 'lib/radar/api/index_service.rb', line 66

def process_prices(seqid, iprot, oprot)
  args = read_args(iprot, Prices_args)
  result = Prices_result.new()
  result.success = @handler.prices(args.symbol, args.start_date, args.end_date)
  write_result(result, oprot, 'prices', seqid)
end