radar-api 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -4
- data/{lib → gen}/radar/api/analyzer_controller.rb +16 -16
- data/gen/radar/api/common_constants.rb +13 -0
- data/gen/radar/api/common_types.rb +117 -0
- data/gen/radar/api/data_server_constants.rb +13 -0
- data/gen/radar/api/data_server_types.rb +52 -0
- data/{lib → gen}/radar/api/fund_service.rb +7 -7
- data/{lib → gen}/radar/api/index_service.rb +4 -4
- data/gen/radar/api/portfolio_analyzer_constants.rb +13 -0
- data/{lib/radar/api/radar_types.rb → gen/radar/api/portfolio_analyzer_types.rb} +31 -172
- data/{lib → gen}/radar/api/security_service.rb +10 -10
- data/gen/radar/api/transaction_sync_constants.rb +13 -0
- data/gen/radar/api/transaction_sync_types.rb +117 -0
- data/gen/radar/api/transaction_synchronizer_controller.rb +135 -0
- data/{lib/radar/api → gen}/radar_constants.rb +1 -5
- data/gen/radar_types.rb +12 -0
- data/lib/radar-api.rb +2 -6
- data/radar-api.gemspec +3 -4
- metadata +28 -19
- data/lib/radar/api/version.rb +0 -5
- data/lib/radar_types.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65daf5706ae99aae181c6bc352e3bcf25be58a0e
|
4
|
+
data.tar.gz: 62d1bc97e3e7389776c11ee59fa760f9214513ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aec16bb72fe42e7ab61e80b9c6ca7ebe334e18c89c565bd457a6a79b3d216a0a4d657df306598042fc4dee1a205c3420feb4b678b1f1a23411baf3b071065f81
|
7
|
+
data.tar.gz: 90b556a57b28f211d912340b9d3a7a98683a4fcb6240f9fb0853ad500b3daf7a5e17dfad5dc1516bf69954d794135f13823077b18cd5edfb87d10040e2075bd4
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
radar-api (0.2.
|
5
|
-
thrift (
|
4
|
+
radar-api (0.2.3)
|
5
|
+
thrift (~> 0.9.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -31,7 +31,7 @@ GEM
|
|
31
31
|
rb-inotify (>= 0.9)
|
32
32
|
lumberjack (1.0.5)
|
33
33
|
method_source (0.8.2)
|
34
|
-
nio4r (1.
|
34
|
+
nio4r (1.2.1)
|
35
35
|
pry (0.9.12.6)
|
36
36
|
coderay (~> 1.0)
|
37
37
|
method_source (~> 0.8)
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
ffi (>= 0.5.0)
|
43
43
|
slop (3.5.0)
|
44
44
|
thor (0.19.1)
|
45
|
-
thrift (0.9.
|
45
|
+
thrift (0.9.3.0)
|
46
46
|
timers (1.1.0)
|
47
47
|
|
48
48
|
PLATFORMS
|
@@ -52,3 +52,6 @@ DEPENDENCIES
|
|
52
52
|
bundler (~> 1.5)
|
53
53
|
guard-rake (= 0.0.9)
|
54
54
|
radar-api!
|
55
|
+
|
56
|
+
BUNDLED WITH
|
57
|
+
1.12.1
|
@@ -1,14 +1,14 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.3)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require '
|
8
|
+
require 'radar/api/portfolio_analyzer_types'
|
9
9
|
|
10
10
|
module Radar
|
11
|
-
module
|
11
|
+
module Api
|
12
12
|
module AnalyzerController
|
13
13
|
class Client
|
14
14
|
include ::Thrift::Client
|
@@ -33,28 +33,28 @@ module Radar
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def send_on_each_day(sessionid, portfolio)
|
36
|
-
|
36
|
+
send_oneway_message('on_each_day', On_each_day_args, :sessionid => sessionid, :portfolio => portfolio)
|
37
37
|
end
|
38
38
|
def on_each_month(sessionid, portfolio)
|
39
39
|
send_on_each_month(sessionid, portfolio)
|
40
40
|
end
|
41
41
|
|
42
42
|
def send_on_each_month(sessionid, portfolio)
|
43
|
-
|
43
|
+
send_oneway_message('on_each_month', On_each_month_args, :sessionid => sessionid, :portfolio => portfolio)
|
44
44
|
end
|
45
45
|
def on_finish(session_id, portfolio)
|
46
46
|
send_on_finish(session_id, portfolio)
|
47
47
|
end
|
48
48
|
|
49
49
|
def send_on_finish(session_id, portfolio)
|
50
|
-
|
50
|
+
send_oneway_message('on_finish', On_finish_args, :session_id => session_id, :portfolio => portfolio)
|
51
51
|
end
|
52
52
|
def on_cash_flow(session_id, cash_flow)
|
53
53
|
send_on_cash_flow(session_id, cash_flow)
|
54
54
|
end
|
55
55
|
|
56
56
|
def send_on_cash_flow(session_id, cash_flow)
|
57
|
-
|
57
|
+
send_oneway_message('on_cash_flow', On_cash_flow_args, :session_id => session_id, :cash_flow => cash_flow)
|
58
58
|
end
|
59
59
|
def create_session(session_id, analyzer_id)
|
60
60
|
send_create_session(session_id, analyzer_id)
|
@@ -91,7 +91,7 @@ module Radar
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def send_resume(session_id, data)
|
94
|
-
|
94
|
+
send_oneway_message('resume', Resume_args, :session_id => session_id, :data => data)
|
95
95
|
end
|
96
96
|
def result(session_id)
|
97
97
|
send_result(session_id)
|
@@ -127,7 +127,7 @@ module Radar
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def send_destroy_session(session_id)
|
130
|
-
|
130
|
+
send_oneway_message('destroy_session', Destroy_session_args, :session_id => session_id)
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
@@ -229,7 +229,7 @@ module Radar
|
|
229
229
|
SUCCESS = 0
|
230
230
|
|
231
231
|
FIELDS = {
|
232
|
-
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::
|
232
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::AnalyzerConfig}}
|
233
233
|
}
|
234
234
|
|
235
235
|
def struct_fields; FIELDS; end
|
@@ -247,7 +247,7 @@ module Radar
|
|
247
247
|
|
248
248
|
FIELDS = {
|
249
249
|
SESSIONID => {:type => ::Thrift::Types::I16, :name => 'sessionid'},
|
250
|
-
PORTFOLIO => {:type => ::Thrift::Types::STRUCT, :name => 'portfolio', :class => ::Radar::
|
250
|
+
PORTFOLIO => {:type => ::Thrift::Types::STRUCT, :name => 'portfolio', :class => ::Radar::Api::Portfolio}
|
251
251
|
}
|
252
252
|
|
253
253
|
def struct_fields; FIELDS; end
|
@@ -280,7 +280,7 @@ module Radar
|
|
280
280
|
|
281
281
|
FIELDS = {
|
282
282
|
SESSIONID => {:type => ::Thrift::Types::I16, :name => 'sessionid'},
|
283
|
-
PORTFOLIO => {:type => ::Thrift::Types::STRUCT, :name => 'portfolio', :class => ::Radar::
|
283
|
+
PORTFOLIO => {:type => ::Thrift::Types::STRUCT, :name => 'portfolio', :class => ::Radar::Api::Portfolio}
|
284
284
|
}
|
285
285
|
|
286
286
|
def struct_fields; FIELDS; end
|
@@ -313,7 +313,7 @@ module Radar
|
|
313
313
|
|
314
314
|
FIELDS = {
|
315
315
|
SESSION_ID => {:type => ::Thrift::Types::I16, :name => 'session_id'},
|
316
|
-
PORTFOLIO => {:type => ::Thrift::Types::STRUCT, :name => 'portfolio', :class => ::Radar::
|
316
|
+
PORTFOLIO => {:type => ::Thrift::Types::STRUCT, :name => 'portfolio', :class => ::Radar::Api::Portfolio}
|
317
317
|
}
|
318
318
|
|
319
319
|
def struct_fields; FIELDS; end
|
@@ -346,7 +346,7 @@ module Radar
|
|
346
346
|
|
347
347
|
FIELDS = {
|
348
348
|
SESSION_ID => {:type => ::Thrift::Types::I16, :name => 'session_id'},
|
349
|
-
CASH_FLOW => {:type => ::Thrift::Types::STRUCT, :name => 'cash_flow', :class => ::Radar::
|
349
|
+
CASH_FLOW => {:type => ::Thrift::Types::STRUCT, :name => 'cash_flow', :class => ::Radar::Api::CashFlow}
|
350
350
|
}
|
351
351
|
|
352
352
|
def struct_fields; FIELDS; end
|
@@ -395,7 +395,7 @@ module Radar
|
|
395
395
|
SUCCESS = 0
|
396
396
|
|
397
397
|
FIELDS = {
|
398
|
-
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Radar::
|
398
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Radar::Api::AnalyzerConfig}
|
399
399
|
}
|
400
400
|
|
401
401
|
def struct_fields; FIELDS; end
|
@@ -492,7 +492,7 @@ module Radar
|
|
492
492
|
SUCCESS = 0
|
493
493
|
|
494
494
|
FIELDS = {
|
495
|
-
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Radar::
|
495
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Radar::Api::Result}
|
496
496
|
}
|
497
497
|
|
498
498
|
def struct_fields; FIELDS; end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.3)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
|
9
|
+
module Radar
|
10
|
+
module Api
|
11
|
+
class StockId
|
12
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
13
|
+
SYMBOL = 1
|
14
|
+
|
15
|
+
FIELDS = {
|
16
|
+
SYMBOL => {:type => ::Thrift::Types::STRING, :name => 'symbol'}
|
17
|
+
}
|
18
|
+
|
19
|
+
def struct_fields; FIELDS; end
|
20
|
+
|
21
|
+
def validate
|
22
|
+
end
|
23
|
+
|
24
|
+
::Thrift::Struct.generate_accessors self
|
25
|
+
end
|
26
|
+
|
27
|
+
class IndexId
|
28
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
29
|
+
SYMBOL = 1
|
30
|
+
|
31
|
+
FIELDS = {
|
32
|
+
SYMBOL => {:type => ::Thrift::Types::STRING, :name => 'symbol'}
|
33
|
+
}
|
34
|
+
|
35
|
+
def struct_fields; FIELDS; end
|
36
|
+
|
37
|
+
def validate
|
38
|
+
end
|
39
|
+
|
40
|
+
::Thrift::Struct.generate_accessors self
|
41
|
+
end
|
42
|
+
|
43
|
+
class FundId
|
44
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
45
|
+
CNPJ = 1
|
46
|
+
|
47
|
+
FIELDS = {
|
48
|
+
CNPJ => {:type => ::Thrift::Types::STRING, :name => 'cnpj'}
|
49
|
+
}
|
50
|
+
|
51
|
+
def struct_fields; FIELDS; end
|
52
|
+
|
53
|
+
def validate
|
54
|
+
end
|
55
|
+
|
56
|
+
::Thrift::Struct.generate_accessors self
|
57
|
+
end
|
58
|
+
|
59
|
+
class IndexLinkedBondId
|
60
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
61
|
+
INDEX = 1
|
62
|
+
FACTOR = 2
|
63
|
+
BASE_DATE = 3
|
64
|
+
MATURITY_DATE = 4
|
65
|
+
|
66
|
+
FIELDS = {
|
67
|
+
INDEX => {:type => ::Thrift::Types::STRUCT, :name => 'index', :class => ::Radar::Api::IndexId},
|
68
|
+
FACTOR => {:type => ::Thrift::Types::DOUBLE, :name => 'factor'},
|
69
|
+
BASE_DATE => {:type => ::Thrift::Types::I32, :name => 'base_date'},
|
70
|
+
MATURITY_DATE => {:type => ::Thrift::Types::I32, :name => 'maturity_date'}
|
71
|
+
}
|
72
|
+
|
73
|
+
def struct_fields; FIELDS; end
|
74
|
+
|
75
|
+
def validate
|
76
|
+
end
|
77
|
+
|
78
|
+
::Thrift::Struct.generate_accessors self
|
79
|
+
end
|
80
|
+
|
81
|
+
class SecurityId < ::Thrift::Union
|
82
|
+
include ::Thrift::Struct_Union
|
83
|
+
class << self
|
84
|
+
def stock(val)
|
85
|
+
SecurityId.new(:stock, val)
|
86
|
+
end
|
87
|
+
|
88
|
+
def fund(val)
|
89
|
+
SecurityId.new(:fund, val)
|
90
|
+
end
|
91
|
+
|
92
|
+
def index_linked_bond(val)
|
93
|
+
SecurityId.new(:index_linked_bond, val)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
STOCK = 1
|
98
|
+
FUND = 2
|
99
|
+
INDEX_LINKED_BOND = 3
|
100
|
+
|
101
|
+
FIELDS = {
|
102
|
+
STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
|
103
|
+
FUND => {:type => ::Thrift::Types::STRUCT, :name => 'fund', :class => ::Radar::Api::FundId},
|
104
|
+
INDEX_LINKED_BOND => {:type => ::Thrift::Types::STRUCT, :name => 'index_linked_bond', :class => ::Radar::Api::IndexLinkedBondId}
|
105
|
+
}
|
106
|
+
|
107
|
+
def struct_fields; FIELDS; end
|
108
|
+
|
109
|
+
def validate
|
110
|
+
raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
|
111
|
+
end
|
112
|
+
|
113
|
+
::Thrift::Union.generate_accessors self
|
114
|
+
end
|
115
|
+
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.3)
|
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/common_types'
|
9
|
+
|
10
|
+
|
11
|
+
module Radar
|
12
|
+
module Api
|
13
|
+
class Price
|
14
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
15
|
+
DATE = 1
|
16
|
+
CLOSE = 2
|
17
|
+
|
18
|
+
FIELDS = {
|
19
|
+
DATE => {:type => ::Thrift::Types::I32, :name => 'date'},
|
20
|
+
CLOSE => {:type => ::Thrift::Types::DOUBLE, :name => 'close'}
|
21
|
+
}
|
22
|
+
|
23
|
+
def struct_fields; FIELDS; end
|
24
|
+
|
25
|
+
def validate
|
26
|
+
end
|
27
|
+
|
28
|
+
::Thrift::Struct.generate_accessors self
|
29
|
+
end
|
30
|
+
|
31
|
+
class DailyFundData
|
32
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
33
|
+
PRICE = 1
|
34
|
+
DATE = 2
|
35
|
+
NAV = 3
|
36
|
+
|
37
|
+
FIELDS = {
|
38
|
+
PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'},
|
39
|
+
DATE => {:type => ::Thrift::Types::I32, :name => 'date'},
|
40
|
+
NAV => {:type => ::Thrift::Types::DOUBLE, :name => 'nav'}
|
41
|
+
}
|
42
|
+
|
43
|
+
def struct_fields; FIELDS; end
|
44
|
+
|
45
|
+
def validate
|
46
|
+
end
|
47
|
+
|
48
|
+
::Thrift::Struct.generate_accessors self
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.3)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require '
|
8
|
+
require 'radar/api/data_server_types'
|
9
9
|
|
10
10
|
module Radar
|
11
|
-
module
|
11
|
+
module Api
|
12
12
|
module FundService
|
13
13
|
class Client
|
14
14
|
include ::Thrift::Client
|
@@ -93,7 +93,7 @@ module Radar
|
|
93
93
|
ID = 1
|
94
94
|
|
95
95
|
FIELDS = {
|
96
|
-
ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::
|
96
|
+
ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::FundId}
|
97
97
|
}
|
98
98
|
|
99
99
|
def struct_fields; FIELDS; end
|
@@ -125,7 +125,7 @@ module Radar
|
|
125
125
|
ID = 1
|
126
126
|
|
127
127
|
FIELDS = {
|
128
|
-
ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::
|
128
|
+
ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::FundId}
|
129
129
|
}
|
130
130
|
|
131
131
|
def struct_fields; FIELDS; end
|
@@ -158,7 +158,7 @@ module Radar
|
|
158
158
|
DATE = 2
|
159
159
|
|
160
160
|
FIELDS = {
|
161
|
-
ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::
|
161
|
+
ID => {:type => ::Thrift::Types::STRUCT, :name => 'id', :class => ::Radar::Api::FundId},
|
162
162
|
DATE => {:type => ::Thrift::Types::I32, :name => 'date'}
|
163
163
|
}
|
164
164
|
|
@@ -175,7 +175,7 @@ module Radar
|
|
175
175
|
SUCCESS = 0
|
176
176
|
|
177
177
|
FIELDS = {
|
178
|
-
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Radar::
|
178
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Radar::Api::DailyFundData}
|
179
179
|
}
|
180
180
|
|
181
181
|
def struct_fields; FIELDS; end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.3)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require '
|
8
|
+
require 'radar/api/data_server_types'
|
9
9
|
|
10
10
|
module Radar
|
11
|
-
module
|
11
|
+
module Api
|
12
12
|
module IndexService
|
13
13
|
class Client
|
14
14
|
include ::Thrift::Client
|
@@ -113,7 +113,7 @@ module Radar
|
|
113
113
|
SUCCESS = 0
|
114
114
|
|
115
115
|
FIELDS = {
|
116
|
-
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::
|
116
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::Price}}
|
117
117
|
}
|
118
118
|
|
119
119
|
def struct_fields; FIELDS; end
|