sfeed 0.0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/i_block_handler.rb +138 -0
- data/lib/i_sfeed_handler.rb +994 -0
- data/lib/sfeed.rb +7 -0
- data/lib/sfeed_constants.rb +11 -0
- data/lib/sfeed_types.rb +309 -0
- metadata +62 -0
data/lib/sfeed.rb
ADDED
data/lib/sfeed_types.rb
ADDED
@@ -0,0 +1,309 @@
|
|
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
|
+
|
9
|
+
module Sfeed
|
10
|
+
module QueryType
|
11
|
+
BEFORE = 1
|
12
|
+
AFTER = 2
|
13
|
+
VALUE_MAP = {1 => "BEFORE", 2 => "AFTER"}
|
14
|
+
VALID_VALUES = Set.new([BEFORE, AFTER]).freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
class Feed
|
18
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
19
|
+
ALBUMID = 1
|
20
|
+
TRACKID = 2
|
21
|
+
UID = 3
|
22
|
+
ALBUMTITLE = 4
|
23
|
+
ALBUMCOVER = 5
|
24
|
+
LASTUPTRACKAT = 6
|
25
|
+
TYPE = 7
|
26
|
+
PLAYPATH32 = 8
|
27
|
+
PLAYPATH64 = 9
|
28
|
+
TRACKTYPE = 10
|
29
|
+
COUNT = 11
|
30
|
+
TIMELINE = 12
|
31
|
+
TRACKTITLE = 13
|
32
|
+
|
33
|
+
FIELDS = {
|
34
|
+
ALBUMID => {:type => ::Thrift::Types::I64, :name => 'albumId', :optional => true},
|
35
|
+
TRACKID => {:type => ::Thrift::Types::I64, :name => 'trackId', :optional => true},
|
36
|
+
UID => {:type => ::Thrift::Types::I64, :name => 'uid', :optional => true},
|
37
|
+
ALBUMTITLE => {:type => ::Thrift::Types::STRING, :name => 'albumTitle', :optional => true},
|
38
|
+
ALBUMCOVER => {:type => ::Thrift::Types::STRING, :name => 'albumCover', :optional => true},
|
39
|
+
LASTUPTRACKAT => {:type => ::Thrift::Types::I64, :name => 'lastUptrackAt', :optional => true},
|
40
|
+
TYPE => {:type => ::Thrift::Types::I32, :name => 'type'},
|
41
|
+
PLAYPATH32 => {:type => ::Thrift::Types::STRING, :name => 'playPath32', :optional => true},
|
42
|
+
PLAYPATH64 => {:type => ::Thrift::Types::STRING, :name => 'playPath64', :optional => true},
|
43
|
+
TRACKTYPE => {:type => ::Thrift::Types::I32, :name => 'trackType', :optional => true},
|
44
|
+
COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :optional => true},
|
45
|
+
TIMELINE => {:type => ::Thrift::Types::DOUBLE, :name => 'timeline'},
|
46
|
+
TRACKTITLE => {:type => ::Thrift::Types::STRING, :name => 'trackTitle', :optional => true}
|
47
|
+
}
|
48
|
+
|
49
|
+
def struct_fields; FIELDS; end
|
50
|
+
|
51
|
+
def validate
|
52
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
|
53
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timeline is unset!') unless @timeline
|
54
|
+
end
|
55
|
+
|
56
|
+
::Thrift::Struct.generate_accessors self
|
57
|
+
end
|
58
|
+
|
59
|
+
class FeedResult
|
60
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
61
|
+
TOTALSIZE = 1
|
62
|
+
FEEDS = 2
|
63
|
+
|
64
|
+
FIELDS = {
|
65
|
+
TOTALSIZE => {:type => ::Thrift::Types::I32, :name => 'totalSize'},
|
66
|
+
FEEDS => {:type => ::Thrift::Types::LIST, :name => 'feeds', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Sfeed::Feed}}
|
67
|
+
}
|
68
|
+
|
69
|
+
def struct_fields; FIELDS; end
|
70
|
+
|
71
|
+
def validate
|
72
|
+
end
|
73
|
+
|
74
|
+
::Thrift::Struct.generate_accessors self
|
75
|
+
end
|
76
|
+
|
77
|
+
class Event
|
78
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
79
|
+
FOLLOWUID = 1
|
80
|
+
FOLLOWNICKNAME = 2
|
81
|
+
FOLLOWAVATAR = 3
|
82
|
+
FOLLOWPERSONALSIGNATURE = 4
|
83
|
+
FOLLOWISV = 5
|
84
|
+
ALBUMID = 6
|
85
|
+
ALBUMTITLE = 7
|
86
|
+
ALBUMCOVER = 8
|
87
|
+
TRACKID = 9
|
88
|
+
TRACKTITLE = 10
|
89
|
+
PLAYPATH32 = 11
|
90
|
+
PLAYPATH64 = 12
|
91
|
+
TRACKCOVER = 13
|
92
|
+
TRACKCREATEDAT = 14
|
93
|
+
TRACKTYPE = 15
|
94
|
+
TRACKNICKNAME = 16
|
95
|
+
|
96
|
+
FIELDS = {
|
97
|
+
FOLLOWUID => {:type => ::Thrift::Types::I64, :name => 'followUid', :optional => true},
|
98
|
+
FOLLOWNICKNAME => {:type => ::Thrift::Types::STRING, :name => 'followNickname', :optional => true},
|
99
|
+
FOLLOWAVATAR => {:type => ::Thrift::Types::STRING, :name => 'followAvatar', :optional => true},
|
100
|
+
FOLLOWPERSONALSIGNATURE => {:type => ::Thrift::Types::STRING, :name => 'followPersonalSignature', :optional => true},
|
101
|
+
FOLLOWISV => {:type => ::Thrift::Types::BOOL, :name => 'followIsV', :optional => true},
|
102
|
+
ALBUMID => {:type => ::Thrift::Types::I64, :name => 'albumId', :optional => true},
|
103
|
+
ALBUMTITLE => {:type => ::Thrift::Types::STRING, :name => 'albumTitle', :optional => true},
|
104
|
+
ALBUMCOVER => {:type => ::Thrift::Types::STRING, :name => 'albumCover', :optional => true},
|
105
|
+
TRACKID => {:type => ::Thrift::Types::I64, :name => 'trackId', :optional => true},
|
106
|
+
TRACKTITLE => {:type => ::Thrift::Types::STRING, :name => 'trackTitle', :optional => true},
|
107
|
+
PLAYPATH32 => {:type => ::Thrift::Types::STRING, :name => 'playPath32', :optional => true},
|
108
|
+
PLAYPATH64 => {:type => ::Thrift::Types::STRING, :name => 'playPath64', :optional => true},
|
109
|
+
TRACKCOVER => {:type => ::Thrift::Types::STRING, :name => 'trackCover', :optional => true},
|
110
|
+
TRACKCREATEDAT => {:type => ::Thrift::Types::I64, :name => 'trackCreatedAt', :optional => true},
|
111
|
+
TRACKTYPE => {:type => ::Thrift::Types::I32, :name => 'trackType', :optional => true},
|
112
|
+
TRACKNICKNAME => {:type => ::Thrift::Types::STRING, :name => 'trackNickname', :optional => true}
|
113
|
+
}
|
114
|
+
|
115
|
+
def struct_fields; FIELDS; end
|
116
|
+
|
117
|
+
def validate
|
118
|
+
end
|
119
|
+
|
120
|
+
::Thrift::Struct.generate_accessors self
|
121
|
+
end
|
122
|
+
|
123
|
+
class MergeEvent
|
124
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
125
|
+
UID = 1
|
126
|
+
NICKNAME = 2
|
127
|
+
AVATAR = 3
|
128
|
+
TYPE = 4
|
129
|
+
TIMELINE = 5
|
130
|
+
EVENTS = 6
|
131
|
+
KEY = 7
|
132
|
+
|
133
|
+
FIELDS = {
|
134
|
+
UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
|
135
|
+
NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
|
136
|
+
AVATAR => {:type => ::Thrift::Types::STRING, :name => 'avatar', :optional => true},
|
137
|
+
TYPE => {:type => ::Thrift::Types::I32, :name => 'type'},
|
138
|
+
TIMELINE => {:type => ::Thrift::Types::DOUBLE, :name => 'timeline'},
|
139
|
+
EVENTS => {:type => ::Thrift::Types::LIST, :name => 'events', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Sfeed::Event}, :optional => true},
|
140
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'}
|
141
|
+
}
|
142
|
+
|
143
|
+
def struct_fields; FIELDS; end
|
144
|
+
|
145
|
+
def validate
|
146
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uid is unset!') unless @uid
|
147
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
|
148
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timeline is unset!') unless @timeline
|
149
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
150
|
+
end
|
151
|
+
|
152
|
+
::Thrift::Struct.generate_accessors self
|
153
|
+
end
|
154
|
+
|
155
|
+
class EventResult
|
156
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
157
|
+
TOTALSIZE = 1
|
158
|
+
EVENTS = 2
|
159
|
+
|
160
|
+
FIELDS = {
|
161
|
+
TOTALSIZE => {:type => ::Thrift::Types::I32, :name => 'totalSize'},
|
162
|
+
EVENTS => {:type => ::Thrift::Types::LIST, :name => 'events', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Sfeed::MergeEvent}}
|
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 BlockAlbum
|
174
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
175
|
+
CURSOR = 1
|
176
|
+
ALBUMUID = 2
|
177
|
+
ALBUMID = 3
|
178
|
+
ALBUMTITLE = 4
|
179
|
+
ALBUMCOVER = 5
|
180
|
+
|
181
|
+
FIELDS = {
|
182
|
+
CURSOR => {:type => ::Thrift::Types::I64, :name => 'cursor'},
|
183
|
+
ALBUMUID => {:type => ::Thrift::Types::I64, :name => 'albumUid'},
|
184
|
+
ALBUMID => {:type => ::Thrift::Types::I64, :name => 'albumId'},
|
185
|
+
ALBUMTITLE => {:type => ::Thrift::Types::STRING, :name => 'albumTitle'},
|
186
|
+
ALBUMCOVER => {:type => ::Thrift::Types::STRING, :name => 'albumCover'}
|
187
|
+
}
|
188
|
+
|
189
|
+
def struct_fields; FIELDS; end
|
190
|
+
|
191
|
+
def validate
|
192
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cursor is unset!') unless @cursor
|
193
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field albumUid is unset!') unless @albumUid
|
194
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field albumId is unset!') unless @albumId
|
195
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field albumTitle is unset!') unless @albumTitle
|
196
|
+
end
|
197
|
+
|
198
|
+
::Thrift::Struct.generate_accessors self
|
199
|
+
end
|
200
|
+
|
201
|
+
class BlockAlbumResult
|
202
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
203
|
+
BLOCKALBUMS = 1
|
204
|
+
COUNT = 2
|
205
|
+
|
206
|
+
FIELDS = {
|
207
|
+
BLOCKALBUMS => {:type => ::Thrift::Types::LIST, :name => 'blockAlbums', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Sfeed::BlockAlbum}},
|
208
|
+
COUNT => {:type => ::Thrift::Types::I32, :name => 'count'}
|
209
|
+
}
|
210
|
+
|
211
|
+
def struct_fields; FIELDS; end
|
212
|
+
|
213
|
+
def validate
|
214
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field blockAlbums is unset!') unless @blockAlbums
|
215
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
|
216
|
+
end
|
217
|
+
|
218
|
+
::Thrift::Struct.generate_accessors self
|
219
|
+
end
|
220
|
+
|
221
|
+
class TrackInfo
|
222
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
223
|
+
ID = 1
|
224
|
+
UID = 2
|
225
|
+
PLAYPATH32 = 3
|
226
|
+
PLAYPATH64 = 4
|
227
|
+
TITLE = 5
|
228
|
+
COVERPATH = 6
|
229
|
+
|
230
|
+
FIELDS = {
|
231
|
+
ID => {:type => ::Thrift::Types::I64, :name => 'id'},
|
232
|
+
UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
|
233
|
+
PLAYPATH32 => {:type => ::Thrift::Types::STRING, :name => 'playPath32', :optional => true},
|
234
|
+
PLAYPATH64 => {:type => ::Thrift::Types::STRING, :name => 'playPath64', :optional => true},
|
235
|
+
TITLE => {:type => ::Thrift::Types::STRING, :name => 'title', :optional => true},
|
236
|
+
COVERPATH => {:type => ::Thrift::Types::STRING, :name => 'coverPath', :optional => true}
|
237
|
+
}
|
238
|
+
|
239
|
+
def struct_fields; FIELDS; end
|
240
|
+
|
241
|
+
def validate
|
242
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
|
243
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uid is unset!') unless @uid
|
244
|
+
end
|
245
|
+
|
246
|
+
::Thrift::Struct.generate_accessors self
|
247
|
+
end
|
248
|
+
|
249
|
+
class RankInfo
|
250
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
251
|
+
RANK = 1
|
252
|
+
SCORE = 2
|
253
|
+
|
254
|
+
FIELDS = {
|
255
|
+
RANK => {:type => ::Thrift::Types::I32, :name => 'rank'},
|
256
|
+
SCORE => {:type => ::Thrift::Types::DOUBLE, :name => 'score'}
|
257
|
+
}
|
258
|
+
|
259
|
+
def struct_fields; FIELDS; end
|
260
|
+
|
261
|
+
def validate
|
262
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field rank is unset!') unless @rank
|
263
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field score is unset!') unless @score
|
264
|
+
end
|
265
|
+
|
266
|
+
::Thrift::Struct.generate_accessors self
|
267
|
+
end
|
268
|
+
|
269
|
+
class RecommendInfo
|
270
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
271
|
+
UID = 1
|
272
|
+
ALBUMID = 2
|
273
|
+
ALBUMCOVER = 3
|
274
|
+
ALBUMTITLE = 4
|
275
|
+
TRACKTITLE = 5
|
276
|
+
NICKNAME = 6
|
277
|
+
PERSONALSIGNATURE = 7
|
278
|
+
AVATAR = 8
|
279
|
+
TRACKID = 9
|
280
|
+
PLAYPATH32 = 10
|
281
|
+
PLAYPATH64 = 11
|
282
|
+
TRACKTYPE = 12
|
283
|
+
|
284
|
+
FIELDS = {
|
285
|
+
UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
|
286
|
+
ALBUMID => {:type => ::Thrift::Types::I64, :name => 'albumId'},
|
287
|
+
ALBUMCOVER => {:type => ::Thrift::Types::STRING, :name => 'albumCover', :optional => true},
|
288
|
+
ALBUMTITLE => {:type => ::Thrift::Types::STRING, :name => 'albumTitle', :optional => true},
|
289
|
+
TRACKTITLE => {:type => ::Thrift::Types::STRING, :name => 'trackTitle', :optional => true},
|
290
|
+
NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
|
291
|
+
PERSONALSIGNATURE => {:type => ::Thrift::Types::STRING, :name => 'personalSignature', :optional => true},
|
292
|
+
AVATAR => {:type => ::Thrift::Types::STRING, :name => 'avatar', :optional => true},
|
293
|
+
TRACKID => {:type => ::Thrift::Types::I64, :name => 'trackId', :optional => true},
|
294
|
+
PLAYPATH32 => {:type => ::Thrift::Types::STRING, :name => 'playPath32', :optional => true},
|
295
|
+
PLAYPATH64 => {:type => ::Thrift::Types::STRING, :name => 'playPath64', :optional => true},
|
296
|
+
TRACKTYPE => {:type => ::Thrift::Types::I32, :name => 'trackType', :optional => true}
|
297
|
+
}
|
298
|
+
|
299
|
+
def struct_fields; FIELDS; end
|
300
|
+
|
301
|
+
def validate
|
302
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uid is unset!') unless @uid
|
303
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field albumId is unset!') unless @albumId
|
304
|
+
end
|
305
|
+
|
306
|
+
::Thrift::Struct.generate_accessors self
|
307
|
+
end
|
308
|
+
|
309
|
+
end
|
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sfeed
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ted Wang
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thrift
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.9.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.9.1
|
27
|
+
description: generated sfeed thrift codes.
|
28
|
+
email: ted@ximalaya.com
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- lib/i_block_handler.rb
|
34
|
+
- lib/i_sfeed_handler.rb
|
35
|
+
- lib/sfeed.rb
|
36
|
+
- lib/sfeed_constants.rb
|
37
|
+
- lib/sfeed_types.rb
|
38
|
+
homepage: http://www.ximalaya.com
|
39
|
+
licenses:
|
40
|
+
- MIT2.0
|
41
|
+
metadata: {}
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
require_paths:
|
45
|
+
- lib
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
requirements: []
|
57
|
+
rubyforge_project:
|
58
|
+
rubygems_version: 2.2.2
|
59
|
+
signing_key:
|
60
|
+
specification_version: 4
|
61
|
+
summary: sfeed ruby thrift client.
|
62
|
+
test_files: []
|