passport_thrift_client 0.0.1

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.
@@ -0,0 +1,244 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'remote_passport_types'
9
+
10
+ module Passport
11
+ module Thrift
12
+ module RemoteStatUserTrackService
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def getUserNewTrack(uid)
17
+ send_getUserNewTrack(uid)
18
+ return recv_getUserNewTrack()
19
+ end
20
+
21
+ def send_getUserNewTrack(uid)
22
+ send_message('getUserNewTrack', GetUserNewTrack_args, :uid => uid)
23
+ end
24
+
25
+ def recv_getUserNewTrack()
26
+ result = receive_message(GetUserNewTrack_result)
27
+ return result.success unless result.success.nil?
28
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getUserNewTrack failed: unknown result')
29
+ end
30
+
31
+ def getUserTotalTime(uid)
32
+ send_getUserTotalTime(uid)
33
+ return recv_getUserTotalTime()
34
+ end
35
+
36
+ def send_getUserTotalTime(uid)
37
+ send_message('getUserTotalTime', GetUserTotalTime_args, :uid => uid)
38
+ end
39
+
40
+ def recv_getUserTotalTime()
41
+ result = receive_message(GetUserTotalTime_result)
42
+ return result.success unless result.success.nil?
43
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getUserTotalTime failed: unknown result')
44
+ end
45
+
46
+ def getStatTrack(uid)
47
+ send_getStatTrack(uid)
48
+ return recv_getStatTrack()
49
+ end
50
+
51
+ def send_getStatTrack(uid)
52
+ send_message('getStatTrack', GetStatTrack_args, :uid => uid)
53
+ end
54
+
55
+ def recv_getStatTrack()
56
+ result = receive_message(GetStatTrack_result)
57
+ return result.success unless result.success.nil?
58
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getStatTrack failed: unknown result')
59
+ end
60
+
61
+ def getUserNewTracks(uids)
62
+ send_getUserNewTracks(uids)
63
+ return recv_getUserNewTracks()
64
+ end
65
+
66
+ def send_getUserNewTracks(uids)
67
+ send_message('getUserNewTracks', GetUserNewTracks_args, :uids => uids)
68
+ end
69
+
70
+ def recv_getUserNewTracks()
71
+ result = receive_message(GetUserNewTracks_result)
72
+ return result.success unless result.success.nil?
73
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getUserNewTracks failed: unknown result')
74
+ end
75
+
76
+ end
77
+
78
+ class Processor
79
+ include ::Thrift::Processor
80
+
81
+ def process_getUserNewTrack(seqid, iprot, oprot)
82
+ args = read_args(iprot, GetUserNewTrack_args)
83
+ result = GetUserNewTrack_result.new()
84
+ result.success = @handler.getUserNewTrack(args.uid)
85
+ write_result(result, oprot, 'getUserNewTrack', seqid)
86
+ end
87
+
88
+ def process_getUserTotalTime(seqid, iprot, oprot)
89
+ args = read_args(iprot, GetUserTotalTime_args)
90
+ result = GetUserTotalTime_result.new()
91
+ result.success = @handler.getUserTotalTime(args.uid)
92
+ write_result(result, oprot, 'getUserTotalTime', seqid)
93
+ end
94
+
95
+ def process_getStatTrack(seqid, iprot, oprot)
96
+ args = read_args(iprot, GetStatTrack_args)
97
+ result = GetStatTrack_result.new()
98
+ result.success = @handler.getStatTrack(args.uid)
99
+ write_result(result, oprot, 'getStatTrack', seqid)
100
+ end
101
+
102
+ def process_getUserNewTracks(seqid, iprot, oprot)
103
+ args = read_args(iprot, GetUserNewTracks_args)
104
+ result = GetUserNewTracks_result.new()
105
+ result.success = @handler.getUserNewTracks(args.uids)
106
+ write_result(result, oprot, 'getUserNewTracks', seqid)
107
+ end
108
+
109
+ end
110
+
111
+ # HELPER FUNCTIONS AND STRUCTURES
112
+
113
+ class GetUserNewTrack_args
114
+ include ::Thrift::Struct, ::Thrift::Struct_Union
115
+ UID = 1
116
+
117
+ FIELDS = {
118
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'}
119
+ }
120
+
121
+ def struct_fields; FIELDS; end
122
+
123
+ def validate
124
+ end
125
+
126
+ ::Thrift::Struct.generate_accessors self
127
+ end
128
+
129
+ class GetUserNewTrack_result
130
+ include ::Thrift::Struct, ::Thrift::Struct_Union
131
+ SUCCESS = 0
132
+
133
+ FIELDS = {
134
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
135
+ }
136
+
137
+ def struct_fields; FIELDS; end
138
+
139
+ def validate
140
+ end
141
+
142
+ ::Thrift::Struct.generate_accessors self
143
+ end
144
+
145
+ class GetUserTotalTime_args
146
+ include ::Thrift::Struct, ::Thrift::Struct_Union
147
+ UID = 1
148
+
149
+ FIELDS = {
150
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'}
151
+ }
152
+
153
+ def struct_fields; FIELDS; end
154
+
155
+ def validate
156
+ end
157
+
158
+ ::Thrift::Struct.generate_accessors self
159
+ end
160
+
161
+ class GetUserTotalTime_result
162
+ include ::Thrift::Struct, ::Thrift::Struct_Union
163
+ SUCCESS = 0
164
+
165
+ FIELDS = {
166
+ SUCCESS => {:type => ::Thrift::Types::DOUBLE, :name => 'success'}
167
+ }
168
+
169
+ def struct_fields; FIELDS; end
170
+
171
+ def validate
172
+ end
173
+
174
+ ::Thrift::Struct.generate_accessors self
175
+ end
176
+
177
+ class GetStatTrack_args
178
+ include ::Thrift::Struct, ::Thrift::Struct_Union
179
+ UID = 1
180
+
181
+ FIELDS = {
182
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'}
183
+ }
184
+
185
+ def struct_fields; FIELDS; end
186
+
187
+ def validate
188
+ end
189
+
190
+ ::Thrift::Struct.generate_accessors self
191
+ end
192
+
193
+ class GetStatTrack_result
194
+ include ::Thrift::Struct, ::Thrift::Struct_Union
195
+ SUCCESS = 0
196
+
197
+ FIELDS = {
198
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Passport::Thrift::StatUserTrackModel}
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 GetUserNewTracks_args
210
+ include ::Thrift::Struct, ::Thrift::Struct_Union
211
+ UIDS = 1
212
+
213
+ FIELDS = {
214
+ UIDS => {:type => ::Thrift::Types::LIST, :name => 'uids', :element => {:type => ::Thrift::Types::I64}}
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 GetUserNewTracks_result
226
+ include ::Thrift::Struct, ::Thrift::Struct_Union
227
+ SUCCESS = 0
228
+
229
+ FIELDS = {
230
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
231
+ }
232
+
233
+ def struct_fields; FIELDS; end
234
+
235
+ def validate
236
+ end
237
+
238
+ ::Thrift::Struct.generate_accessors self
239
+ end
240
+
241
+ end
242
+
243
+ end
244
+ end