profile_thrift_client 0.0.1 → 0.0.2

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: 0962e2f2aa809118308c7bc5e162a0b5e5b8f312
4
- data.tar.gz: 9d31fa4c710fea8934e3e875c760598e6138e7d2
3
+ metadata.gz: f1baf0a97b41814f1c5e45d6b16157ef9f054ab4
4
+ data.tar.gz: 7f5ff381e9aef174174954964eb1b0ec3a99e2a8
5
5
  SHA512:
6
- metadata.gz: 693d037935f41eea4712dbec106e1a3755bd0b7efb1cf7e5568438c860706912f4b49ae485ed20b75892e1af63c3e30e5a033b1645d319c61927ed5e18060eb5
7
- data.tar.gz: ccae273b8384afcd9317fac42ccc02da7c42a62f77f463fb137eca41f04c036cea2883305adc03eaed10598128d0cb7908ebdafa04895c39c5e97eee3c8b713b
6
+ metadata.gz: 8cf5f7d6365bd6f9cceb12e257fc83cc48d07b6c0f8d6dc8801b3c2641dcac6228384c772d864cb58f575377741424917103e90696660711de2564b80ecabbdb
7
+ data.tar.gz: 0fa96b8c7a2bd9440486e53718eae5adafca1bceeaa5dc8de57fc35c6dbe89b56a86fd9b350e5036cc1d76bfd3c69d88c38cc689c8ac1cbb6a1a3d37c3c54803
@@ -57,14 +57,6 @@ module Profile
57
57
  @@logger.error("thriftUserProfileService destroyed!")
58
58
  end
59
59
 
60
- def save(profile = {})
61
- if (profile['uid'].nil?)
62
- return
63
- end
64
- profile = Profile::Thrift::Profile.new(profile)
65
- @thriftClient.save(profile)
66
- end
67
-
68
60
  def getProfileByUid(uid)
69
61
  profile = @thriftClient.getProfileByUid(uid)
70
62
  return convert_profile_to_hash(profile)
@@ -180,7 +172,35 @@ module Profile
180
172
  def getProfielByEmail(email)
181
173
  convert_profile_to_hash(@thriftClient.getProfielByEmail(email))
182
174
  end
175
+
176
+ def modifyNicknameByUid(uid, nickname, statistic_parameters_hash=nil)
177
+ if uid.nil? || nickname.nil?
178
+ raise "parameter error,uid and nickname can not be null"
179
+ end
180
+ @thriftClient.modifyNicknameByUid(uid, nickname, statistic_parameters_hash.nil? ? nil : StatisticParameters.new(statistic_parameters_hash))
181
+ end
182
+
183
+ def updatePrifileLogo(uid, logo_pic, statistic_parameters_hash=nil)
184
+ if uid.nil? || logo_pic.nil?
185
+ raise "parameter error,uid and logo_pic can not be null"
186
+ end
187
+ @thriftClient.updatePrifileLogo(uid, logo_pic, statistic_parameters_hash.nil? ? nil : StatisticParameters.new(statistic_parameters_hash))
188
+ end
183
189
 
190
+ def updateWebBackground(uid, pic_path, positionx=0, positiony=0, statistic_parameters_hash=nil)
191
+ if uid.nil? || pic_path.nil?
192
+ raise "parameter error,uid and pic_path can not be null"
193
+ end
194
+ @thriftClient.updateWebBackground(uid, pic_path, positionx,positiony, statistic_parameters_hash.nil? ? nil : StatisticParameters.new(statistic_parameters_hash))
195
+ end
196
+
197
+ def updateMobileBackground(uid, pic_path, statistic_parameters_hash=nil)
198
+ if uid.nil? || pic_path.nil?
199
+ raise "parameter error,uid and pic_path can not be null"
200
+ end
201
+ @thriftClient.updateMobileBackground(uid, pic_path, statistic_parameters_hash.nil? ? nil : StatisticParameters.new(statistic_parameters_hash))
202
+ end
203
+
184
204
  def convert_profile_to_hash(profile)
185
205
  unless profile.nil? || profile.isNull
186
206
  profile = profile.to_hash
@@ -13,34 +13,19 @@ module Profile
13
13
  class Client
14
14
  include ::Thrift::Client
15
15
 
16
- def save(profile)
17
- send_save(profile)
18
- return recv_save()
16
+ def saveMobileProfileWithStatisticParameters(uid, nickname, signatrue, statisticParameters)
17
+ send_saveMobileProfileWithStatisticParameters(uid, nickname, signatrue, statisticParameters)
18
+ return recv_saveMobileProfileWithStatisticParameters()
19
19
  end
20
20
 
21
- def send_save(profile)
22
- send_message('save', Save_args, :profile => profile)
21
+ def send_saveMobileProfileWithStatisticParameters(uid, nickname, signatrue, statisticParameters)
22
+ send_message('saveMobileProfileWithStatisticParameters', SaveMobileProfileWithStatisticParameters_args, :uid => uid, :nickname => nickname, :signatrue => signatrue, :statisticParameters => statisticParameters)
23
23
  end
24
24
 
25
- def recv_save()
26
- result = receive_message(Save_result)
25
+ def recv_saveMobileProfileWithStatisticParameters()
26
+ result = receive_message(SaveMobileProfileWithStatisticParameters_result)
27
27
  return result.success unless result.success.nil?
28
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'save failed: unknown result')
29
- end
30
-
31
- def saveWithStatisticParameters(profile, statisticParameters)
32
- send_saveWithStatisticParameters(profile, statisticParameters)
33
- return recv_saveWithStatisticParameters()
34
- end
35
-
36
- def send_saveWithStatisticParameters(profile, statisticParameters)
37
- send_message('saveWithStatisticParameters', SaveWithStatisticParameters_args, :profile => profile, :statisticParameters => statisticParameters)
38
- end
39
-
40
- def recv_saveWithStatisticParameters()
41
- result = receive_message(SaveWithStatisticParameters_result)
42
- return result.success unless result.success.nil?
43
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'saveWithStatisticParameters failed: unknown result')
28
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'saveMobileProfileWithStatisticParameters failed: unknown result')
44
29
  end
45
30
 
46
31
  def updatePrifileLogo(uid, picLogo, statisticParameters)
@@ -295,23 +280,31 @@ module Profile
295
280
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getVerifiedUid failed: unknown result')
296
281
  end
297
282
 
283
+ def modifyNicknameByUid(uid, nickname, staticticParameter)
284
+ send_modifyNicknameByUid(uid, nickname, staticticParameter)
285
+ return recv_modifyNicknameByUid()
286
+ end
287
+
288
+ def send_modifyNicknameByUid(uid, nickname, staticticParameter)
289
+ send_message('modifyNicknameByUid', ModifyNicknameByUid_args, :uid => uid, :nickname => nickname, :staticticParameter => staticticParameter)
290
+ end
291
+
292
+ def recv_modifyNicknameByUid()
293
+ result = receive_message(ModifyNicknameByUid_result)
294
+ return result.success unless result.success.nil?
295
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'modifyNicknameByUid failed: unknown result')
296
+ end
297
+
298
298
  end
299
299
 
300
300
  class Processor
301
301
  include ::Thrift::Processor
302
302
 
303
- def process_save(seqid, iprot, oprot)
304
- args = read_args(iprot, Save_args)
305
- result = Save_result.new()
306
- result.success = @handler.save(args.profile)
307
- write_result(result, oprot, 'save', seqid)
308
- end
309
-
310
- def process_saveWithStatisticParameters(seqid, iprot, oprot)
311
- args = read_args(iprot, SaveWithStatisticParameters_args)
312
- result = SaveWithStatisticParameters_result.new()
313
- result.success = @handler.saveWithStatisticParameters(args.profile, args.statisticParameters)
314
- write_result(result, oprot, 'saveWithStatisticParameters', seqid)
303
+ def process_saveMobileProfileWithStatisticParameters(seqid, iprot, oprot)
304
+ args = read_args(iprot, SaveMobileProfileWithStatisticParameters_args)
305
+ result = SaveMobileProfileWithStatisticParameters_result.new()
306
+ result.success = @handler.saveMobileProfileWithStatisticParameters(args.uid, args.nickname, args.signatrue, args.statisticParameters)
307
+ write_result(result, oprot, 'saveMobileProfileWithStatisticParameters', seqid)
315
308
  end
316
309
 
317
310
  def process_updatePrifileLogo(seqid, iprot, oprot)
@@ -433,49 +426,28 @@ module Profile
433
426
  write_result(result, oprot, 'getVerifiedUid', seqid)
434
427
  end
435
428
 
436
- end
437
-
438
- # HELPER FUNCTIONS AND STRUCTURES
439
-
440
- class Save_args
441
- include ::Thrift::Struct, ::Thrift::Struct_Union
442
- PROFILE = 1
443
-
444
- FIELDS = {
445
- PROFILE => {:type => ::Thrift::Types::STRUCT, :name => 'profile', :class => ::Profile::Thrift::Profile}
446
- }
447
-
448
- def struct_fields; FIELDS; end
449
-
450
- def validate
429
+ def process_modifyNicknameByUid(seqid, iprot, oprot)
430
+ args = read_args(iprot, ModifyNicknameByUid_args)
431
+ result = ModifyNicknameByUid_result.new()
432
+ result.success = @handler.modifyNicknameByUid(args.uid, args.nickname, args.staticticParameter)
433
+ write_result(result, oprot, 'modifyNicknameByUid', seqid)
451
434
  end
452
435
 
453
- ::Thrift::Struct.generate_accessors self
454
436
  end
455
437
 
456
- class Save_result
457
- include ::Thrift::Struct, ::Thrift::Struct_Union
458
- SUCCESS = 0
459
-
460
- FIELDS = {
461
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Profile::Thrift::ThriftCommonResponse}
462
- }
463
-
464
- def struct_fields; FIELDS; end
465
-
466
- def validate
467
- end
468
-
469
- ::Thrift::Struct.generate_accessors self
470
- end
438
+ # HELPER FUNCTIONS AND STRUCTURES
471
439
 
472
- class SaveWithStatisticParameters_args
440
+ class SaveMobileProfileWithStatisticParameters_args
473
441
  include ::Thrift::Struct, ::Thrift::Struct_Union
474
- PROFILE = 1
475
- STATISTICPARAMETERS = 2
442
+ UID = 1
443
+ NICKNAME = 2
444
+ SIGNATRUE = 3
445
+ STATISTICPARAMETERS = 4
476
446
 
477
447
  FIELDS = {
478
- PROFILE => {:type => ::Thrift::Types::STRUCT, :name => 'profile', :class => ::Profile::Thrift::Profile},
448
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
449
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'},
450
+ SIGNATRUE => {:type => ::Thrift::Types::STRING, :name => 'signatrue'},
479
451
  STATISTICPARAMETERS => {:type => ::Thrift::Types::STRUCT, :name => 'statisticParameters', :class => ::Profile::Thrift::StatisticParameters}
480
452
  }
481
453
 
@@ -487,7 +459,7 @@ module Profile
487
459
  ::Thrift::Struct.generate_accessors self
488
460
  end
489
461
 
490
- class SaveWithStatisticParameters_result
462
+ class SaveMobileProfileWithStatisticParameters_result
491
463
  include ::Thrift::Struct, ::Thrift::Struct_Union
492
464
  SUCCESS = 0
493
465
 
@@ -1066,6 +1038,42 @@ module Profile
1066
1038
  ::Thrift::Struct.generate_accessors self
1067
1039
  end
1068
1040
 
1041
+ class ModifyNicknameByUid_args
1042
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1043
+ UID = 1
1044
+ NICKNAME = 2
1045
+ STATICTICPARAMETER = 3
1046
+
1047
+ FIELDS = {
1048
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
1049
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'},
1050
+ STATICTICPARAMETER => {:type => ::Thrift::Types::STRUCT, :name => 'staticticParameter', :class => ::Profile::Thrift::StatisticParameters}
1051
+ }
1052
+
1053
+ def struct_fields; FIELDS; end
1054
+
1055
+ def validate
1056
+ end
1057
+
1058
+ ::Thrift::Struct.generate_accessors self
1059
+ end
1060
+
1061
+ class ModifyNicknameByUid_result
1062
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1063
+ SUCCESS = 0
1064
+
1065
+ FIELDS = {
1066
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Profile::Thrift::ThriftCommonResponse}
1067
+ }
1068
+
1069
+ def struct_fields; FIELDS; end
1070
+
1071
+ def validate
1072
+ end
1073
+
1074
+ ::Thrift::Struct.generate_accessors self
1075
+ end
1076
+
1069
1077
  end
1070
1078
 
1071
1079
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: profile_thrift_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-26 00:00:00.000000000 Z
11
+ date: 2014-06-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -30,17 +30,17 @@ require_paths:
30
30
  - lib
31
31
  required_ruby_version: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  requirements: []
42
42
  rubyforge_project:
43
- rubygems_version: 2.0.3
43
+ rubygems_version: 2.0.14
44
44
  signing_key:
45
45
  specification_version: 4
46
46
  summary: profile_thrift_client is a thrift client of passport