stat-analysis-query 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75c7b569584d266cb1bfa7589d381f0f682121d3
4
- data.tar.gz: 6caa3689584daac683828ae5616ac9c3c97356b3
3
+ metadata.gz: 94b95bdca5a0122141f213424e983a4543452e2d
4
+ data.tar.gz: cabfb24605123a4d71d2be39cc5a6bc7c353e4dc
5
5
  SHA512:
6
- metadata.gz: 7610354ed01c4a1ddc4bb200e961bd0da9c420e5ce8252d42efa490ad7f66cdc24c32a7bcfcf79072486b8d77071b77166d53c1e7da2f784827515adc8801457
7
- data.tar.gz: cf8803a2320ba80b40385babf9b83d353193812c8d24db35f1c1501200e089587938b0dbc37ae7ebd9ffe842f6026fc15f878b3bc1a060abee8a7eeef0f211b7
6
+ metadata.gz: db85d5fa706d66687690116572966daa99d01f2b62f5e724d9eb2da9ad5ed5936a9884015ffc969c8c1640ac7160b74b529a231cfded91842742bbedac64d483
7
+ data.tar.gz: 51db78eaaae32cecdab187b8c815eadfde226acc0bb9c14e35574c8fe08c1ac7265877189a4e98cd70b89747c23b9445027f70df0e0e945d591e9adcbc6d98dd
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.9.0)
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
data/lib/query_types.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.9.0)
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.9.0)
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.9.0)
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -56,7 +56,8 @@ module Stat
56
56
  IS_CHECKED = 4
57
57
  ORDER_NUM = 5
58
58
  COVER = 6
59
- TAGS = 7
59
+ SELECTED_SWITCH = 7
60
+ TAGS = 8
60
61
 
61
62
  FIELDS = {
62
63
  ID => {:type => ::Thrift::Types::I32, :name => 'id'},
@@ -65,6 +66,7 @@ module Stat
65
66
  IS_CHECKED => {:type => ::Thrift::Types::BOOL, :name => 'is_checked', :optional => true},
66
67
  ORDER_NUM => {:type => ::Thrift::Types::I32, :name => 'order_num', :optional => true},
67
68
  COVER => {:type => ::Thrift::Types::STRING, :name => 'cover', :optional => true},
69
+ SELECTED_SWITCH => {:type => ::Thrift::Types::BOOL, :name => 'selected_switch', :optional => true},
68
70
  TAGS => {:type => ::Thrift::Types::LIST, :name => 'tags', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
69
71
  }
70
72
 
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.9.0)
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.9.0)
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -215,6 +215,21 @@ module Stat
215
215
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'selectMobileMultiCategories failed: unknown result')
216
216
  end
217
217
 
218
+ def getSelectedAlbumSwitch(catetoryIds)
219
+ send_getSelectedAlbumSwitch(catetoryIds)
220
+ return recv_getSelectedAlbumSwitch()
221
+ end
222
+
223
+ def send_getSelectedAlbumSwitch(catetoryIds)
224
+ send_message('getSelectedAlbumSwitch', GetSelectedAlbumSwitch_args, :catetoryIds => catetoryIds)
225
+ end
226
+
227
+ def recv_getSelectedAlbumSwitch()
228
+ result = receive_message(GetSelectedAlbumSwitch_result)
229
+ return result.success unless result.success.nil?
230
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSelectedAlbumSwitch failed: unknown result')
231
+ end
232
+
218
233
  end
219
234
 
220
235
  class Processor
@@ -317,6 +332,13 @@ module Stat
317
332
  write_result(result, oprot, 'selectMobileMultiCategories', seqid)
318
333
  end
319
334
 
335
+ def process_getSelectedAlbumSwitch(seqid, iprot, oprot)
336
+ args = read_args(iprot, GetSelectedAlbumSwitch_args)
337
+ result = GetSelectedAlbumSwitch_result.new()
338
+ result.success = @handler.getSelectedAlbumSwitch(args.catetoryIds)
339
+ write_result(result, oprot, 'getSelectedAlbumSwitch', seqid)
340
+ end
341
+
320
342
  end
321
343
 
322
344
  # HELPER FUNCTIONS AND STRUCTURES
@@ -783,6 +805,38 @@ module Stat
783
805
  ::Thrift::Struct.generate_accessors self
784
806
  end
785
807
 
808
+ class GetSelectedAlbumSwitch_args
809
+ include ::Thrift::Struct, ::Thrift::Struct_Union
810
+ CATETORYIDS = 1
811
+
812
+ FIELDS = {
813
+ CATETORYIDS => {:type => ::Thrift::Types::LIST, :name => 'catetoryIds', :element => {:type => ::Thrift::Types::I32}}
814
+ }
815
+
816
+ def struct_fields; FIELDS; end
817
+
818
+ def validate
819
+ end
820
+
821
+ ::Thrift::Struct.generate_accessors self
822
+ end
823
+
824
+ class GetSelectedAlbumSwitch_result
825
+ include ::Thrift::Struct, ::Thrift::Struct_Union
826
+ SUCCESS = 0
827
+
828
+ FIELDS = {
829
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::BOOL}}
830
+ }
831
+
832
+ def struct_fields; FIELDS; end
833
+
834
+ def validate
835
+ end
836
+
837
+ ::Thrift::Struct.generate_accessors self
838
+ end
839
+
786
840
  end
787
841
 
788
842
  end
data/lib/t_hot_service.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.9.0)
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -148,6 +148,21 @@ module Stat
148
148
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'hotAlbum failed: unknown result')
149
149
  end
150
150
 
151
+ def hotSelectedAlbum(id, tagName, pageNo, pageSize)
152
+ send_hotSelectedAlbum(id, tagName, pageNo, pageSize)
153
+ return recv_hotSelectedAlbum()
154
+ end
155
+
156
+ def send_hotSelectedAlbum(id, tagName, pageNo, pageSize)
157
+ send_message('hotSelectedAlbum', HotSelectedAlbum_args, :id => id, :tagName => tagName, :pageNo => pageNo, :pageSize => pageSize)
158
+ end
159
+
160
+ def recv_hotSelectedAlbum()
161
+ result = receive_message(HotSelectedAlbum_result)
162
+ return result.success unless result.success.nil?
163
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'hotSelectedAlbum failed: unknown result')
164
+ end
165
+
151
166
  def hotRadioAndSound(categoryIds)
152
167
  send_hotRadioAndSound(categoryIds)
153
168
  return recv_hotRadioAndSound()
@@ -261,6 +276,13 @@ module Stat
261
276
  write_result(result, oprot, 'hotAlbum', seqid)
262
277
  end
263
278
 
279
+ def process_hotSelectedAlbum(seqid, iprot, oprot)
280
+ args = read_args(iprot, HotSelectedAlbum_args)
281
+ result = HotSelectedAlbum_result.new()
282
+ result.success = @handler.hotSelectedAlbum(args.id, args.tagName, args.pageNo, args.pageSize)
283
+ write_result(result, oprot, 'hotSelectedAlbum', seqid)
284
+ end
285
+
264
286
  def process_hotRadioAndSound(seqid, iprot, oprot)
265
287
  args = read_args(iprot, HotRadioAndSound_args)
266
288
  result = HotRadioAndSound_result.new()
@@ -620,6 +642,44 @@ module Stat
620
642
  ::Thrift::Struct.generate_accessors self
621
643
  end
622
644
 
645
+ class HotSelectedAlbum_args
646
+ include ::Thrift::Struct, ::Thrift::Struct_Union
647
+ ID = 1
648
+ TAGNAME = 2
649
+ PAGENO = 3
650
+ PAGESIZE = 4
651
+
652
+ FIELDS = {
653
+ ID => {:type => ::Thrift::Types::I32, :name => 'id'},
654
+ TAGNAME => {:type => ::Thrift::Types::STRING, :name => 'tagName'},
655
+ PAGENO => {:type => ::Thrift::Types::I32, :name => 'pageNo'},
656
+ PAGESIZE => {:type => ::Thrift::Types::I32, :name => 'pageSize'}
657
+ }
658
+
659
+ def struct_fields; FIELDS; end
660
+
661
+ def validate
662
+ end
663
+
664
+ ::Thrift::Struct.generate_accessors self
665
+ end
666
+
667
+ class HotSelectedAlbum_result
668
+ include ::Thrift::Struct, ::Thrift::Struct_Union
669
+ SUCCESS = 0
670
+
671
+ FIELDS = {
672
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Stat::Query::HotResult}
673
+ }
674
+
675
+ def struct_fields; FIELDS; end
676
+
677
+ def validate
678
+ end
679
+
680
+ ::Thrift::Struct.generate_accessors self
681
+ end
682
+
623
683
  class HotRadioAndSound_args
624
684
  include ::Thrift::Struct, ::Thrift::Struct_Union
625
685
  CATEGORYIDS = 1
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.9.0)
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -17,7 +17,7 @@ class QueryTest < Test::Unit::TestCase
17
17
  'size' => 1,
18
18
  'multiplexed' => true,
19
19
  'client_class' => 'Stat::Query::TDiscoverService::Client',
20
- 'servers' => '192.168.3.161:9002'
20
+ 'servers' => '127.0.0.1:9002'
21
21
  }
22
22
 
23
23
  @client = ThriftClient.new(config)
@@ -78,23 +78,23 @@ class QueryTest < Test::Unit::TestCase
78
78
 
79
79
  def test_selectMobileCategory
80
80
  assert_nothing_raised {
81
- @client.selectMobileCategory(1,"ios",1)
82
- @client.selectMobileCategory(2,"ios",1)
83
- @client.selectMobileCategory(1,"ios",2)
84
- @client.selectMobileCategory(1,"android",1)
85
- @client.selectMobileCategory(2,"android",1)
86
- @client.selectMobileCategory(1,"android",2)
81
+ p @client.selectMobileCategory(1,"ios",1)
82
+ p @client.selectMobileCategory(2,"ios",1)
83
+ p @client.selectMobileCategory(1,"ios",2)
84
+ p @client.selectMobileCategory(1,"android",1)
85
+ p @client.selectMobileCategory(2,"android",1)
86
+ p @client.selectMobileCategory(1,"android",2)
87
87
  }
88
88
  end
89
89
 
90
90
  def test_selectMobileHumanCategory
91
91
  assert_nothing_raised {
92
- @client.selectMobileHumanCategory(1,"ios",1)
93
- @client.selectMobileHumanCategory(2,"ios",1)
94
- @client.selectMobileHumanCategory(1,"ios",2)
95
- @client.selectMobileHumanCategory(1,"android",1)
96
- @client.selectMobileHumanCategory(2,"android",1)
97
- @client.selectMobileHumanCategory(1,"android",2)
92
+ p @client.selectMobileHumanCategory(1,"ios",1)
93
+ p @client.selectMobileHumanCategory(2,"ios",1)
94
+ p @client.selectMobileHumanCategory(1,"ios",2)
95
+ p @client.selectMobileHumanCategory(1,"android",1)
96
+ p @client.selectMobileHumanCategory(2,"android",1)
97
+ p @client.selectMobileHumanCategory(1,"android",2)
98
98
  }
99
99
  end
100
100
 
@@ -148,10 +148,17 @@ class QueryTest < Test::Unit::TestCase
148
148
  category_version.store(10,"1")
149
149
  category_version.store(11,"1")
150
150
  assert_nothing_raised {
151
- @client.selectMobileMultiCategories(category_version,"ios",1)
152
- @client.selectMobileMultiCategories(category_version,"android",1)
153
- @client.selectMobileMultiCategories(category_version,"ios",2)
154
- @client.selectMobileMultiCategories(category_version,"android",2)
151
+ p @client.selectMobileMultiCategories(category_version,"ios",1)
152
+ p @client.selectMobileMultiCategories(category_version,"android",1)
153
+ p @client.selectMobileMultiCategories(category_version,"ios",2)
154
+ p @client.selectMobileMultiCategories(category_version,"android",2)
155
+ }
156
+ end
157
+
158
+ def test_getSelectedAlbumSwitch
159
+ category_ids = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
160
+ assert_nothing_raised {
161
+ p @client.getSelectedAlbumSwitch(category_ids)
155
162
  }
156
163
  end
157
164
 
data/test/hot_test.rb CHANGED
@@ -17,7 +17,7 @@ class QueryTest < Test::Unit::TestCase
17
17
  'size' => 1,
18
18
  'multiplexed' => true,
19
19
  'client_class' => 'Stat::Query::THotService::Client',
20
- 'servers' => '192.168.3.161:9002'
20
+ 'servers' => '127.0.0.1:9002'
21
21
  }
22
22
 
23
23
  @client = ThriftClient.new(config)
@@ -39,11 +39,11 @@ class QueryTest < Test::Unit::TestCase
39
39
  def test_mostFollowedUser
40
40
  assert_nothing_raised {puts @client.mostFollowedUser(1,1,1).inspect}
41
41
  end
42
-
42
+
43
43
  def test_mostFavoritSound
44
44
  assert_nothing_raised {puts @client.mostFavoritSound(1,nil,1,1).inspect}
45
45
  end
46
-
46
+
47
47
  def test_recentVTrack
48
48
  assert_nothing_raised {puts @client.recentVTrack(1,nil,1,1).inspect}
49
49
  end
@@ -60,6 +60,10 @@ class QueryTest < Test::Unit::TestCase
60
60
  assert_nothing_raised {puts @client.hotAlbum(1,nil,1,1).inspect}
61
61
  end
62
62
 
63
+ def test_hotSelectedAlbum
64
+ assert_nothing_raised {p @client.hotSelectedAlbum(3,nil,1,1).inspect}
65
+ end
66
+
63
67
  def test_hotRadioAndSound
64
68
  categories = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
65
69
  assert_nothing_raised {puts @client.hotRadioAndSound(categories).inspect}
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stat-analysis-query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ted Wang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-15 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2014-01-26 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'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: stat-analysis-query
14
28
  email: ted@ximalaya.com
15
29
  executables: []