radar-api 0.14.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile.lock +10 -3
  3. data/Rakefile +4 -0
  4. data/gen/exporter_pb.rb +17 -0
  5. data/gen/exporter_services_pb.rb +22 -0
  6. data/gen/portfolios_pb.rb +58 -0
  7. data/gen/portfolios_services_pb.rb +22 -0
  8. data/lib/radar-api.rb +1 -13
  9. data/radar-api.gemspec +2 -1
  10. metadata +24 -33
  11. data/gen/radar/api/analyzer_controller.rb +0 -605
  12. data/gen/radar/api/calendar_service.rb +0 -200
  13. data/gen/radar/api/common_constants.rb +0 -13
  14. data/gen/radar/api/common_types.rb +0 -223
  15. data/gen/radar/api/data_server_constants.rb +0 -13
  16. data/gen/radar/api/data_server_types.rb +0 -97
  17. data/gen/radar/api/fund_service.rb +0 -192
  18. data/gen/radar/api/healthz.rb +0 -84
  19. data/gen/radar/api/healthz_constants.rb +0 -13
  20. data/gen/radar/api/healthz_types.rb +0 -19
  21. data/gen/radar/api/index_service.rb +0 -200
  22. data/gen/radar/api/integration_status_service.rb +0 -74
  23. data/gen/radar/api/portfolio_analyzer_constants.rb +0 -13
  24. data/gen/radar/api/portfolio_analyzer_types.rb +0 -661
  25. data/gen/radar/api/portfolio_service.rb +0 -194
  26. data/gen/radar/api/security_service.rb +0 -370
  27. data/gen/radar/api/transaction_constants.rb +0 -13
  28. data/gen/radar/api/transaction_file_importer.rb +0 -94
  29. data/gen/radar/api/transaction_file_importer_constants.rb +0 -13
  30. data/gen/radar/api/transaction_file_importer_types.rb +0 -38
  31. data/gen/radar/api/transaction_importer.rb +0 -252
  32. data/gen/radar/api/transaction_importer_constants.rb +0 -13
  33. data/gen/radar/api/transaction_importer_types.rb +0 -60
  34. data/gen/radar/api/transaction_types.rb +0 -302
  35. data/gen/radar_constants.rb +0 -9
  36. data/gen/radar_types.rb +0 -14
@@ -1,194 +0,0 @@
1
- #
2
- # Autogenerated by Thrift Compiler (0.12.0)
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- require 'thrift'
8
- require 'radar/api/data_server_types'
9
-
10
- module Radar
11
- module Api
12
- module PortfolioService
13
- class Client
14
- include ::Thrift::Client
15
-
16
- def run_portfolio(trxs, reports_dates, user)
17
- send_run_portfolio(trxs, reports_dates, user)
18
- return recv_run_portfolio()
19
- end
20
-
21
- def send_run_portfolio(trxs, reports_dates, user)
22
- send_message('run_portfolio', Run_portfolio_args, :trxs => trxs, :reports_dates => reports_dates, :user => user)
23
- end
24
-
25
- def recv_run_portfolio()
26
- result = receive_message(Run_portfolio_result)
27
- return result.success unless result.success.nil?
28
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'run_portfolio failed: unknown result')
29
- end
30
-
31
- def persist(trxs, user)
32
- send_persist(trxs, user)
33
- recv_persist()
34
- end
35
-
36
- def send_persist(trxs, user)
37
- send_message('persist', Persist_args, :trxs => trxs, :user => user)
38
- end
39
-
40
- def recv_persist()
41
- result = receive_message(Persist_result)
42
- return
43
- end
44
-
45
- def persist_brokers(brokers, user)
46
- send_persist_brokers(brokers, user)
47
- recv_persist_brokers()
48
- end
49
-
50
- def send_persist_brokers(brokers, user)
51
- send_message('persist_brokers', Persist_brokers_args, :brokers => brokers, :user => user)
52
- end
53
-
54
- def recv_persist_brokers()
55
- result = receive_message(Persist_brokers_result)
56
- return
57
- end
58
-
59
- end
60
-
61
- class Processor
62
- include ::Thrift::Processor
63
-
64
- def process_run_portfolio(seqid, iprot, oprot)
65
- args = read_args(iprot, Run_portfolio_args)
66
- result = Run_portfolio_result.new()
67
- result.success = @handler.run_portfolio(args.trxs, args.reports_dates, args.user)
68
- write_result(result, oprot, 'run_portfolio', seqid)
69
- end
70
-
71
- def process_persist(seqid, iprot, oprot)
72
- args = read_args(iprot, Persist_args)
73
- result = Persist_result.new()
74
- @handler.persist(args.trxs, args.user)
75
- write_result(result, oprot, 'persist', seqid)
76
- end
77
-
78
- def process_persist_brokers(seqid, iprot, oprot)
79
- args = read_args(iprot, Persist_brokers_args)
80
- result = Persist_brokers_result.new()
81
- @handler.persist_brokers(args.brokers, args.user)
82
- write_result(result, oprot, 'persist_brokers', seqid)
83
- end
84
-
85
- end
86
-
87
- # HELPER FUNCTIONS AND STRUCTURES
88
-
89
- class Run_portfolio_args
90
- include ::Thrift::Struct, ::Thrift::Struct_Union
91
- TRXS = 1
92
- REPORTS_DATES = 2
93
- USER = 3
94
-
95
- FIELDS = {
96
- TRXS => {:type => ::Thrift::Types::LIST, :name => 'trxs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::Transaction}},
97
- REPORTS_DATES => {:type => ::Thrift::Types::LIST, :name => 'reports_dates', :element => {:type => ::Thrift::Types::I64}},
98
- USER => {:type => ::Thrift::Types::STRING, :name => 'user'}
99
- }
100
-
101
- def struct_fields; FIELDS; end
102
-
103
- def validate
104
- end
105
-
106
- ::Thrift::Struct.generate_accessors self
107
- end
108
-
109
- class Run_portfolio_result
110
- include ::Thrift::Struct, ::Thrift::Struct_Union
111
- SUCCESS = 0
112
-
113
- FIELDS = {
114
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::MonthlyPosition}}
115
- }
116
-
117
- def struct_fields; FIELDS; end
118
-
119
- def validate
120
- end
121
-
122
- ::Thrift::Struct.generate_accessors self
123
- end
124
-
125
- class Persist_args
126
- include ::Thrift::Struct, ::Thrift::Struct_Union
127
- TRXS = 1
128
- USER = 2
129
-
130
- FIELDS = {
131
- TRXS => {:type => ::Thrift::Types::LIST, :name => 'trxs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::Transaction}},
132
- USER => {:type => ::Thrift::Types::STRING, :name => 'user'}
133
- }
134
-
135
- def struct_fields; FIELDS; end
136
-
137
- def validate
138
- end
139
-
140
- ::Thrift::Struct.generate_accessors self
141
- end
142
-
143
- class Persist_result
144
- include ::Thrift::Struct, ::Thrift::Struct_Union
145
-
146
- FIELDS = {
147
-
148
- }
149
-
150
- def struct_fields; FIELDS; end
151
-
152
- def validate
153
- end
154
-
155
- ::Thrift::Struct.generate_accessors self
156
- end
157
-
158
- class Persist_brokers_args
159
- include ::Thrift::Struct, ::Thrift::Struct_Union
160
- BROKERS = 1
161
- USER = 2
162
-
163
- FIELDS = {
164
- BROKERS => {:type => ::Thrift::Types::LIST, :name => 'brokers', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::Broker}},
165
- USER => {:type => ::Thrift::Types::STRING, :name => 'user'}
166
- }
167
-
168
- def struct_fields; FIELDS; end
169
-
170
- def validate
171
- end
172
-
173
- ::Thrift::Struct.generate_accessors self
174
- end
175
-
176
- class Persist_brokers_result
177
- include ::Thrift::Struct, ::Thrift::Struct_Union
178
-
179
- FIELDS = {
180
-
181
- }
182
-
183
- def struct_fields; FIELDS; end
184
-
185
- def validate
186
- end
187
-
188
- ::Thrift::Struct.generate_accessors self
189
- end
190
-
191
- end
192
-
193
- end
194
- end
@@ -1,370 +0,0 @@
1
- #
2
- # Autogenerated by Thrift Compiler (0.12.0)
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- require 'thrift'
8
- require 'radar/api/data_server_types'
9
-
10
- module Radar
11
- module Api
12
- module SecurityService
13
- class Client
14
- include ::Thrift::Client
15
-
16
- def short_name(id)
17
- send_short_name(id)
18
- return recv_short_name()
19
- end
20
-
21
- def send_short_name(id)
22
- send_message('short_name', Short_name_args, :id => id)
23
- end
24
-
25
- def recv_short_name()
26
- result = receive_message(Short_name_result)
27
- return result.success unless result.success.nil?
28
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'short_name failed: unknown result')
29
- end
30
-
31
- def prices(id, start_date, end_date)
32
- send_prices(id, start_date, end_date)
33
- return recv_prices()
34
- end
35
-
36
- def send_prices(id, start_date, end_date)
37
- send_message('prices', Prices_args, :id => id, :start_date => start_date, :end_date => end_date)
38
- end
39
-
40
- def recv_prices()
41
- result = receive_message(Prices_result)
42
- return result.success unless result.success.nil?
43
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'prices failed: unknown result')
44
- end
45
-
46
- def price(id, date)
47
- send_price(id, date)
48
- return recv_price()
49
- end
50
-
51
- def send_price(id, date)
52
- send_message('price', Price_args, :id => id, :date => date)
53
- end
54
-
55
- def recv_price()
56
- result = receive_message(Price_result)
57
- return result.success unless result.success.nil?
58
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'price failed: unknown result')
59
- end
60
-
61
- def price_change(id, start_date, end_date)
62
- send_price_change(id, start_date, end_date)
63
- return recv_price_change()
64
- end
65
-
66
- def send_price_change(id, start_date, end_date)
67
- send_message('price_change', Price_change_args, :id => id, :start_date => start_date, :end_date => end_date)
68
- end
69
-
70
- def recv_price_change()
71
- result = receive_message(Price_change_result)
72
- return result.success unless result.success.nil?
73
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'price_change failed: unknown result')
74
- end
75
-
76
- def price_changes(id, start_date, end_date)
77
- send_price_changes(id, start_date, end_date)
78
- return recv_price_changes()
79
- end
80
-
81
- def send_price_changes(id, start_date, end_date)
82
- send_message('price_changes', Price_changes_args, :id => id, :start_date => start_date, :end_date => end_date)
83
- end
84
-
85
- def recv_price_changes()
86
- result = receive_message(Price_changes_result)
87
- return result.success unless result.success.nil?
88
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'price_changes failed: unknown result')
89
- end
90
-
91
- def price_volatility(id, start_date, end_date)
92
- send_price_volatility(id, start_date, end_date)
93
- return recv_price_volatility()
94
- end
95
-
96
- def send_price_volatility(id, start_date, end_date)
97
- send_message('price_volatility', Price_volatility_args, :id => id, :start_date => start_date, :end_date => end_date)
98
- end
99
-
100
- def recv_price_volatility()
101
- result = receive_message(Price_volatility_result)
102
- return result.success unless result.success.nil?
103
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'price_volatility failed: unknown result')
104
- end
105
-
106
- end
107
-
108
- class Processor
109
- include ::Thrift::Processor
110
-
111
- def process_short_name(seqid, iprot, oprot)
112
- args = read_args(iprot, Short_name_args)
113
- result = Short_name_result.new()
114
- result.success = @handler.short_name(args.id)
115
- write_result(result, oprot, 'short_name', seqid)
116
- end
117
-
118
- def process_prices(seqid, iprot, oprot)
119
- args = read_args(iprot, Prices_args)
120
- result = Prices_result.new()
121
- result.success = @handler.prices(args.id, args.start_date, args.end_date)
122
- write_result(result, oprot, 'prices', seqid)
123
- end
124
-
125
- def process_price(seqid, iprot, oprot)
126
- args = read_args(iprot, Price_args)
127
- result = Price_result.new()
128
- result.success = @handler.price(args.id, args.date)
129
- write_result(result, oprot, 'price', seqid)
130
- end
131
-
132
- def process_price_change(seqid, iprot, oprot)
133
- args = read_args(iprot, Price_change_args)
134
- result = Price_change_result.new()
135
- result.success = @handler.price_change(args.id, args.start_date, args.end_date)
136
- write_result(result, oprot, 'price_change', seqid)
137
- end
138
-
139
- def process_price_changes(seqid, iprot, oprot)
140
- args = read_args(iprot, Price_changes_args)
141
- result = Price_changes_result.new()
142
- result.success = @handler.price_changes(args.id, args.start_date, args.end_date)
143
- write_result(result, oprot, 'price_changes', seqid)
144
- end
145
-
146
- def process_price_volatility(seqid, iprot, oprot)
147
- args = read_args(iprot, Price_volatility_args)
148
- result = Price_volatility_result.new()
149
- result.success = @handler.price_volatility(args.id, args.start_date, args.end_date)
150
- write_result(result, oprot, 'price_volatility', seqid)
151
- end
152
-
153
- end
154
-
155
- # HELPER FUNCTIONS AND STRUCTURES
156
-
157
- class Short_name_args
158
- include ::Thrift::Struct, ::Thrift::Struct_Union
159
- ID = 1
160
-
161
- FIELDS = {
162
- ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::SecurityId}
163
- }
164
-
165
- def struct_fields; FIELDS; end
166
-
167
- def validate
168
- end
169
-
170
- ::Thrift::Struct.generate_accessors self
171
- end
172
-
173
- class Short_name_result
174
- include ::Thrift::Struct, ::Thrift::Struct_Union
175
- SUCCESS = 0
176
-
177
- FIELDS = {
178
- SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
179
- }
180
-
181
- def struct_fields; FIELDS; end
182
-
183
- def validate
184
- end
185
-
186
- ::Thrift::Struct.generate_accessors self
187
- end
188
-
189
- class Prices_args
190
- include ::Thrift::Struct, ::Thrift::Struct_Union
191
- ID = 1
192
- START_DATE = 2
193
- END_DATE = 3
194
-
195
- FIELDS = {
196
- ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::SecurityId},
197
- START_DATE => {:type => ::Thrift::Types::I64, :name => 'start_date'},
198
- END_DATE => {:type => ::Thrift::Types::I64, :name => 'end_date'}
199
- }
200
-
201
- def struct_fields; FIELDS; end
202
-
203
- def validate
204
- end
205
-
206
- ::Thrift::Struct.generate_accessors self
207
- end
208
-
209
- class Prices_result
210
- include ::Thrift::Struct, ::Thrift::Struct_Union
211
- SUCCESS = 0
212
-
213
- FIELDS = {
214
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::Price}}
215
- }
216
-
217
- def struct_fields; FIELDS; end
218
-
219
- def validate
220
- end
221
-
222
- ::Thrift::Struct.generate_accessors self
223
- end
224
-
225
- class Price_args
226
- include ::Thrift::Struct, ::Thrift::Struct_Union
227
- ID = 1
228
- DATE = 2
229
-
230
- FIELDS = {
231
- ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::SecurityId},
232
- DATE => {:type => ::Thrift::Types::I64, :name => 'date'}
233
- }
234
-
235
- def struct_fields; FIELDS; end
236
-
237
- def validate
238
- end
239
-
240
- ::Thrift::Struct.generate_accessors self
241
- end
242
-
243
- class Price_result
244
- include ::Thrift::Struct, ::Thrift::Struct_Union
245
- SUCCESS = 0
246
-
247
- FIELDS = {
248
- SUCCESS => {:type => ::Thrift::Types::DOUBLE, :name => 'success'}
249
- }
250
-
251
- def struct_fields; FIELDS; end
252
-
253
- def validate
254
- end
255
-
256
- ::Thrift::Struct.generate_accessors self
257
- end
258
-
259
- class Price_change_args
260
- include ::Thrift::Struct, ::Thrift::Struct_Union
261
- ID = 1
262
- START_DATE = 2
263
- END_DATE = 3
264
-
265
- FIELDS = {
266
- ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::SecurityId},
267
- START_DATE => {:type => ::Thrift::Types::I64, :name => 'start_date'},
268
- END_DATE => {:type => ::Thrift::Types::I64, :name => 'end_date'}
269
- }
270
-
271
- def struct_fields; FIELDS; end
272
-
273
- def validate
274
- end
275
-
276
- ::Thrift::Struct.generate_accessors self
277
- end
278
-
279
- class Price_change_result
280
- include ::Thrift::Struct, ::Thrift::Struct_Union
281
- SUCCESS = 0
282
-
283
- FIELDS = {
284
- SUCCESS => {:type => ::Thrift::Types::DOUBLE, :name => 'success'}
285
- }
286
-
287
- def struct_fields; FIELDS; end
288
-
289
- def validate
290
- end
291
-
292
- ::Thrift::Struct.generate_accessors self
293
- end
294
-
295
- class Price_changes_args
296
- include ::Thrift::Struct, ::Thrift::Struct_Union
297
- ID = 1
298
- START_DATE = 2
299
- END_DATE = 3
300
-
301
- FIELDS = {
302
- ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::SecurityId},
303
- START_DATE => {:type => ::Thrift::Types::I64, :name => 'start_date'},
304
- END_DATE => {:type => ::Thrift::Types::I64, :name => 'end_date'}
305
- }
306
-
307
- def struct_fields; FIELDS; end
308
-
309
- def validate
310
- end
311
-
312
- ::Thrift::Struct.generate_accessors self
313
- end
314
-
315
- class Price_changes_result
316
- include ::Thrift::Struct, ::Thrift::Struct_Union
317
- SUCCESS = 0
318
-
319
- FIELDS = {
320
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::DOUBLE}}
321
- }
322
-
323
- def struct_fields; FIELDS; end
324
-
325
- def validate
326
- end
327
-
328
- ::Thrift::Struct.generate_accessors self
329
- end
330
-
331
- class Price_volatility_args
332
- include ::Thrift::Struct, ::Thrift::Struct_Union
333
- ID = 1
334
- START_DATE = 2
335
- END_DATE = 3
336
-
337
- FIELDS = {
338
- ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::SecurityId},
339
- START_DATE => {:type => ::Thrift::Types::I64, :name => 'start_date'},
340
- END_DATE => {:type => ::Thrift::Types::I64, :name => 'end_date'}
341
- }
342
-
343
- def struct_fields; FIELDS; end
344
-
345
- def validate
346
- end
347
-
348
- ::Thrift::Struct.generate_accessors self
349
- end
350
-
351
- class Price_volatility_result
352
- include ::Thrift::Struct, ::Thrift::Struct_Union
353
- SUCCESS = 0
354
-
355
- FIELDS = {
356
- SUCCESS => {:type => ::Thrift::Types::DOUBLE, :name => 'success'}
357
- }
358
-
359
- def struct_fields; FIELDS; end
360
-
361
- def validate
362
- end
363
-
364
- ::Thrift::Struct.generate_accessors self
365
- end
366
-
367
- end
368
-
369
- end
370
- end