passport_thrift_client 0.0.1 → 0.0.9

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: 44b219afea4fc8c88a314af4353e5e18cc4be853
4
- data.tar.gz: c620abdb51001a00d5f7be7e146710ac8a0a2e93
3
+ metadata.gz: 8493a6df69e30d4d9a751c97f4d2cdcbead6f53a
4
+ data.tar.gz: 4491bd73e0e2de4cd2c866c06a645442a553714b
5
5
  SHA512:
6
- metadata.gz: 6e0ecbb20b147fe0e99ef9eff4bf87b7c0ad368947a12ec00282b553a94912db16f5d41ed7562988f0e4a157d92cf5bf1113865e9b77b8ade0dba79a8bd107c5
7
- data.tar.gz: 707f0d75dcd765a89b52560f36d3cbbd16479ff271b19d02c9e556751d70cef246e6dc3d8c418b97cdba1e56c9d78df6ff7e1af49b982dd925bb6e2cb5d11494
6
+ metadata.gz: 09bd49676f2de8b4da92aba2cce66eee81f9717c63c8582e6b88afd7e931be30ad476e2d8e4c9a34874c7026f94663bf28adbe5bb727cf9f9c8a243c7d3f3aad
7
+ data.tar.gz: e6b042e4484acca61181eb3d5c2bdf1b2dcfe7daced439e484fffb2bd0be04c809abeab392e83c74ce1e86a9a9a15d9b4bb5f10d56838f567b05196224ae22f8
@@ -5,6 +5,7 @@ require 'remote_passport_types'
5
5
  require 'remote_stat_user_track_service'
6
6
  require 'remote_thirdparty_sync_set_service'
7
7
  require 'remote_user_profile_service'
8
+ require 'logger'
8
9
 
9
10
  module Passport
10
11
  module Thrift
@@ -20,6 +21,22 @@ module Passport
20
21
  'pool_timeout' => 12
21
22
  }
22
23
 
24
+ class LoggerFactory
25
+ @@logger = nil
26
+ def self.getLogger(name)
27
+ if @@logger.nil?
28
+ if @@logger.nil?
29
+ log_path = "../passport-client.log"
30
+ log_level = "error";
31
+ logger = Logger.new(log_path,'daily')
32
+ logger.level = Logger::const_get(log_level.upcase)
33
+ @@logger = logger;
34
+ end
35
+ end
36
+ @@logger
37
+ end
38
+ end
39
+
23
40
  class ThriftUserProfileService
24
41
 
25
42
  def initialize(config = {})
@@ -30,6 +47,17 @@ module Passport
30
47
  config = DEFAULT_CONFIG.merge(config)
31
48
  config['client_class'] = 'Passport::Thrift::RemoteUserProfileService::Client'
32
49
  @thriftClient = ThriftClient.new(config)
50
+ @@logger = LoggerFactory.getLogger("ThriftUserProfileService")
51
+ end
52
+
53
+ def destroy
54
+ @@logger.error("before ThriftUserProfileService destroy")
55
+ begin
56
+ @thriftClient.destroy
57
+ rescue Exception => e
58
+ @@logger.error("ThriftUserProfileService destroy error !! #{e.message}" + "\n" + e.backtrace.join("\n"))
59
+ end
60
+ @@logger.error("thriftUserProfileService destroyed!")
33
61
  end
34
62
 
35
63
  def getProfileByUid(uid)
@@ -58,7 +86,21 @@ module Passport
58
86
  end
59
87
 
60
88
  def queryUserBasicInfo(uid)
61
- convert_user_basicinfo_to_hash(@thriftClient.queryUserBasicInfo(uid))
89
+ begin
90
+ if uid && uid.to_i > 0
91
+ info = @thriftClient.queryUserBasicInfo(uid)
92
+ info = convert_user_basicinfo_to_hash(info)
93
+ end
94
+ unless info
95
+ @@logger.error("query user basic info return nil , uid: #{uid}")
96
+ end
97
+ return info
98
+ rescue Exception => e
99
+ @@logger.error("query user basic info error, uid: #{uid},cause by :#{e.message}," + " \n" + e.backtrace.join("\n"))
100
+ if info
101
+ @@logger.error("info : #{info.inspect}")
102
+ end
103
+ end
62
104
  end
63
105
 
64
106
  def getMultiUserBasicInfos(uids)
@@ -172,8 +214,19 @@ module Passport
172
214
  config = DEFAULT_CONFIG.merge(config)
173
215
  config['client_class'] = 'Passport::Thrift::RemoteLoginService::Client'
174
216
  @thriftClient = ThriftClient.new(config)
217
+ @@logger = LoggerFactory.getLogger("ThriftLoginService")
175
218
  end
176
219
 
220
+ def destroy
221
+ @@logger.error("before ThriftLoginService destroy")
222
+ begin
223
+ @thriftClient.destroy
224
+ rescue Exception => e
225
+ @@logger.error("ThriftLoginService destroy error !! #{e.message}" + "\n" + e.backtrace.join("\n"))
226
+ end
227
+ @@logger.error("ThriftLoginService destroyed!")
228
+ end
229
+
177
230
  def checkLogin(token, rememberMe, loginHelpInfoHash)
178
231
  loginHelpInfo = LoginHelpInfo.new(loginHelpInfoHash)
179
232
  @thriftClient.checkLogin(token, rememberMe, loginHelpInfo)
@@ -204,8 +257,19 @@ module Passport
204
257
  config = DEFAULT_CONFIG.merge(config)
205
258
  config['client_class'] = 'Passport::Thrift::RemotePassportService::Client'
206
259
  @thriftClient = ThriftClient.new(config)
260
+ @@logger = LoggerFactory.getLogger("ThriftPassportService")
207
261
  end
208
262
 
263
+ def destroy
264
+ @@logger.error("before ThriftPassportService destroy")
265
+ begin
266
+ @thriftClient.destroy
267
+ rescue Exception => e
268
+ @@logger.error("ThriftPassportService destroy error !! #{e.message}" + "\n" + e.backtrace.join("\n"))
269
+ end
270
+ @@logger.error("ThriftPassportService destroyed!")
271
+ end
272
+
209
273
  def queryPassportByEmail(email)
210
274
  convert_passport_to_hash(@thriftClient.queryPassportByEmail(email))
211
275
  end
@@ -285,8 +349,19 @@ module Passport
285
349
  config = DEFAULT_CONFIG.merge(config)
286
350
  config['client_class'] = 'Passport::Thrift::RemoteStatUserTrackService::Client'
287
351
  @thriftClient = ThriftClient.new(config)
352
+ @@logger = LoggerFactory.getLogger("ThriftStatUserTrackService")
288
353
  end
289
354
 
355
+ def destroy
356
+ @@logger.error("before ThriftStatUserTrackService destroy")
357
+ begin
358
+ @thriftClient.destroy
359
+ rescue Exception => e
360
+ @@logger.error("ThriftStatUserTrackService destroy error !! #{e.message}" + "\n" + e.backtrace.join("\n"))
361
+ end
362
+ @@logger.error("ThriftStatUserTrackService destroyed!")
363
+ end
364
+
290
365
  def getUserNewTrack(uid)
291
366
  @thriftClient.getUserNewTrack(uid)
292
367
  end
@@ -321,8 +396,19 @@ module Passport
321
396
  config = DEFAULT_CONFIG.merge(config)
322
397
  config['client_class'] = 'Passport::Thrift::RemoteThirdpartySyncSetService::Client'
323
398
  @thriftClient = ThriftClient.new(config)
399
+ @@logger = LoggerFactory.getLogger("ThriftThirdpartySyncSetService")
324
400
  end
325
401
 
402
+ def destroy
403
+ @@logger.error("before ThriftThirdpartySyncSetService destroy")
404
+ begin
405
+ @thriftClient.destroy
406
+ rescue Exception => e
407
+ @@logger.error("ThriftThirdpartySyncSetService destroy error !! #{e.message}" + "\n" + e.backtrace.join("\n"))
408
+ end
409
+ @@logger.error("ThriftThirdpartySyncSetService destroyed!")
410
+ end
411
+
326
412
  def insertDefalutSyncSet(tpUid, thirdpartyName)
327
413
  convert_sync_set_to_hash(@thriftClient.insertDefalutSyncSet(tpUid, thirdpartyName))
328
414
  end
@@ -30,22 +30,22 @@ module Passport
30
30
 
31
31
  FIELDS = {
32
32
  ISCHECKFLAG => {:type => ::Thrift::Types::BOOL, :name => 'isCheckFlag'},
33
- LOGINFLAGTOKEN => {:type => ::Thrift::Types::STRING, :name => 'loginFlagToken'},
34
- LOGINACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'loginAccount'},
33
+ LOGINFLAGTOKEN => {:type => ::Thrift::Types::STRING, :name => 'loginFlagToken', :optional => true},
34
+ LOGINACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'loginAccount', :optional => true},
35
35
  UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
36
- NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'},
36
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
37
37
  ISREMEMBERME => {:type => ::Thrift::Types::BOOL, :name => 'isRememberMe'},
38
38
  THIRDPARTYID => {:type => ::Thrift::Types::I64, :name => 'thirdpartyId'},
39
- THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName'},
40
- JOINTYPE => {:type => ::Thrift::Types::STRING, :name => 'joinType'},
41
- THIRDPARTYIDENTITY => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyIdentity'},
39
+ THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName', :optional => true},
40
+ JOINTYPE => {:type => ::Thrift::Types::STRING, :name => 'joinType', :optional => true},
41
+ THIRDPARTYIDENTITY => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyIdentity', :optional => true},
42
42
  TPUID => {:type => ::Thrift::Types::I64, :name => 'tpUid'},
43
- IP => {:type => ::Thrift::Types::STRING, :name => 'ip'},
44
- LONGITUDE => {:type => ::Thrift::Types::STRING, :name => 'longitude'},
45
- LATITUDE => {:type => ::Thrift::Types::STRING, :name => 'latitude'},
46
- USERAGENT => {:type => ::Thrift::Types::STRING, :name => 'userAgent'},
43
+ IP => {:type => ::Thrift::Types::STRING, :name => 'ip', :optional => true},
44
+ LONGITUDE => {:type => ::Thrift::Types::STRING, :name => 'longitude', :optional => true},
45
+ LATITUDE => {:type => ::Thrift::Types::STRING, :name => 'latitude', :optional => true},
46
+ USERAGENT => {:type => ::Thrift::Types::STRING, :name => 'userAgent', :optional => true},
47
47
  CLIENTTYPEID => {:type => ::Thrift::Types::I32, :name => 'clientTypeId'},
48
- LOGINTOPICTYPE => {:type => ::Thrift::Types::STRING, :name => 'loginTopicType'}
48
+ LOGINTOPICTYPE => {:type => ::Thrift::Types::STRING, :name => 'loginTopicType', :optional => true}
49
49
  }
50
50
 
51
51
  def struct_fields; FIELDS; end
@@ -73,19 +73,19 @@ module Passport
73
73
  LATITUDE = 13
74
74
 
75
75
  FIELDS = {
76
- ACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'account'},
77
- PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
78
- CHECKCODE => {:type => ::Thrift::Types::STRING, :name => 'checkCode'},
79
- REMEMBERME => {:type => ::Thrift::Types::STRING, :name => 'rememberMe'},
80
- FROMURI => {:type => ::Thrift::Types::STRING, :name => 'fromUri'},
81
- PROXYURL => {:type => ::Thrift::Types::STRING, :name => 'proxyUrl'},
82
- DOMAIN => {:type => ::Thrift::Types::STRING, :name => 'domain'},
76
+ ACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'account', :optional => true},
77
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true},
78
+ CHECKCODE => {:type => ::Thrift::Types::STRING, :name => 'checkCode', :optional => true},
79
+ REMEMBERME => {:type => ::Thrift::Types::STRING, :name => 'rememberMe', :optional => true},
80
+ FROMURI => {:type => ::Thrift::Types::STRING, :name => 'fromUri', :optional => true},
81
+ PROXYURL => {:type => ::Thrift::Types::STRING, :name => 'proxyUrl', :optional => true},
82
+ DOMAIN => {:type => ::Thrift::Types::STRING, :name => 'domain', :optional => true},
83
83
  PRODUCTID => {:type => ::Thrift::Types::I64, :name => 'productId'},
84
- CHECKUUID => {:type => ::Thrift::Types::STRING, :name => 'checkUUID'},
85
- CHECKCODEURL => {:type => ::Thrift::Types::STRING, :name => 'checkCodeUrl'},
86
- IP => {:type => ::Thrift::Types::STRING, :name => 'ip'},
87
- LONGITUDE => {:type => ::Thrift::Types::STRING, :name => 'longitude'},
88
- LATITUDE => {:type => ::Thrift::Types::STRING, :name => 'latitude'}
84
+ CHECKUUID => {:type => ::Thrift::Types::STRING, :name => 'checkUUID', :optional => true},
85
+ CHECKCODEURL => {:type => ::Thrift::Types::STRING, :name => 'checkCodeUrl', :optional => true},
86
+ IP => {:type => ::Thrift::Types::STRING, :name => 'ip', :optional => true},
87
+ LONGITUDE => {:type => ::Thrift::Types::STRING, :name => 'longitude', :optional => true},
88
+ LATITUDE => {:type => ::Thrift::Types::STRING, :name => 'latitude', :optional => true}
89
89
  }
90
90
 
91
91
  def struct_fields; FIELDS; end
@@ -103,7 +103,7 @@ module Passport
103
103
 
104
104
  FIELDS = {
105
105
  UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
106
- TOKEN => {:type => ::Thrift::Types::STRING, :name => 'token'}
106
+ TOKEN => {:type => ::Thrift::Types::STRING, :name => 'token', :optional => true}
107
107
  }
108
108
 
109
109
  def struct_fields; FIELDS; end
@@ -129,10 +129,10 @@ module Passport
129
129
 
130
130
  FIELDS = {
131
131
  UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
132
- EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email'},
133
- ACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'account'},
134
- MPHONE => {:type => ::Thrift::Types::STRING, :name => 'mPhone'},
135
- PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
132
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
133
+ ACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'account', :optional => true},
134
+ MPHONE => {:type => ::Thrift::Types::STRING, :name => 'mPhone', :optional => true},
135
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true},
136
136
  ACTIVED => {:type => ::Thrift::Types::BOOL, :name => 'actived'},
137
137
  CREATETIME => {:type => ::Thrift::Types::I64, :name => 'createTime'},
138
138
  ISROBOT => {:type => ::Thrift::Types::BOOL, :name => 'isRobot'},
@@ -154,8 +154,8 @@ module Passport
154
154
  CODE = 2
155
155
 
156
156
  FIELDS = {
157
- ERRORCODE => {:type => ::Thrift::Types::STRING, :name => 'errorCode'},
158
- CODE => {:type => ::Thrift::Types::STRING, :name => 'code'}
157
+ ERRORCODE => {:type => ::Thrift::Types::STRING, :name => 'errorCode', :optional => true},
158
+ CODE => {:type => ::Thrift::Types::STRING, :name => 'code', :optional => true}
159
159
  }
160
160
 
161
161
  def struct_fields; FIELDS; end
@@ -176,7 +176,7 @@ module Passport
176
176
  FIELDS = {
177
177
  UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
178
178
  TID => {:type => ::Thrift::Types::I64, :name => 'tid'},
179
- TNAME => {:type => ::Thrift::Types::STRING, :name => 'tname'},
179
+ TNAME => {:type => ::Thrift::Types::STRING, :name => 'tname', :optional => true},
180
180
  TIME => {:type => ::Thrift::Types::DOUBLE, :name => 'time'}
181
181
  }
182
182
 
@@ -208,7 +208,7 @@ module Passport
208
208
  WEBALBUM => {:type => ::Thrift::Types::BOOL, :name => 'webAlbum'},
209
209
  WEBFAVORITE => {:type => ::Thrift::Types::BOOL, :name => 'webFavorite'},
210
210
  RELAY => {:type => ::Thrift::Types::BOOL, :name => 'relay'},
211
- THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName'},
211
+ THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName', :optional => true},
212
212
  THIRDPARTYUSERID => {:type => ::Thrift::Types::I64, :name => 'thirdpartyUserId'}
213
213
  }
214
214
 
@@ -231,10 +231,10 @@ module Passport
231
231
 
232
232
  FIELDS = {
233
233
  THIRDPARTYID => {:type => ::Thrift::Types::I64, :name => 'thirdpartyId'},
234
- THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName'},
235
- THIRDPARTYNICKNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyNickname'},
234
+ THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName', :optional => true},
235
+ THIRDPARTYNICKNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyNickname', :optional => true},
236
236
  ISEXPIRED => {:type => ::Thrift::Types::BOOL, :name => 'isExpired'},
237
- HOMEPAGE => {:type => ::Thrift::Types::STRING, :name => 'homePage'},
237
+ HOMEPAGE => {:type => ::Thrift::Types::STRING, :name => 'homePage', :optional => true},
238
238
  THIRDPARTYUID => {:type => ::Thrift::Types::I64, :name => 'thirdpartyUid'}
239
239
  }
240
240
 
@@ -326,78 +326,78 @@ module Passport
326
326
 
327
327
  FIELDS = {
328
328
  UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
329
- NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'},
330
- GENDER => {:type => ::Thrift::Types::STRING, :name => 'gender'},
329
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
330
+ GENDER => {:type => ::Thrift::Types::STRING, :name => 'gender', :optional => true},
331
331
  BIRTHYEAR => {:type => ::Thrift::Types::I32, :name => 'birthYear'},
332
332
  BIRTHMONTH => {:type => ::Thrift::Types::I32, :name => 'birthMonth'},
333
333
  BIRTHDAY => {:type => ::Thrift::Types::I32, :name => 'birthDay'},
334
334
  ISSECRETYEAR => {:type => ::Thrift::Types::I32, :name => 'isSecretYear'},
335
- BLOODTYPE => {:type => ::Thrift::Types::STRING, :name => 'bloodType'},
336
- CONSTELLATION => {:type => ::Thrift::Types::STRING, :name => 'constellation'},
337
- HOMECOUNTRY => {:type => ::Thrift::Types::STRING, :name => 'homeCountry'},
338
- HOMEPROVINCE => {:type => ::Thrift::Types::STRING, :name => 'homeProvince'},
339
- HOMECITY => {:type => ::Thrift::Types::STRING, :name => 'homeCity'},
340
- HOMETOWN => {:type => ::Thrift::Types::STRING, :name => 'homeTown'},
341
- COUNTRY => {:type => ::Thrift::Types::STRING, :name => 'country'},
342
- PROVINCE => {:type => ::Thrift::Types::STRING, :name => 'province'},
343
- CITY => {:type => ::Thrift::Types::STRING, :name => 'city'},
344
- TOWN => {:type => ::Thrift::Types::STRING, :name => 'town'},
345
- MOBILE => {:type => ::Thrift::Types::STRING, :name => 'mobile'},
346
- TELEPHONE => {:type => ::Thrift::Types::STRING, :name => 'telephone'},
347
- PROFESSION => {:type => ::Thrift::Types::STRING, :name => 'profession'},
348
- FINISHSCHOOL => {:type => ::Thrift::Types::STRING, :name => 'finishSchool'},
349
- PERSONALHOMEPAGE => {:type => ::Thrift::Types::STRING, :name => 'personalHomepage'},
350
- PERSONALCOMMENT => {:type => ::Thrift::Types::STRING, :name => 'personalComment'},
351
- PERSONALSIGNATURE => {:type => ::Thrift::Types::STRING, :name => 'personalSignature'},
352
- LOGOPIC => {:type => ::Thrift::Types::STRING, :name => 'logoPic'},
353
- EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email'},
335
+ BLOODTYPE => {:type => ::Thrift::Types::STRING, :name => 'bloodType', :optional => true},
336
+ CONSTELLATION => {:type => ::Thrift::Types::STRING, :name => 'constellation', :optional => true},
337
+ HOMECOUNTRY => {:type => ::Thrift::Types::STRING, :name => 'homeCountry', :optional => true},
338
+ HOMEPROVINCE => {:type => ::Thrift::Types::STRING, :name => 'homeProvince', :optional => true},
339
+ HOMECITY => {:type => ::Thrift::Types::STRING, :name => 'homeCity', :optional => true},
340
+ HOMETOWN => {:type => ::Thrift::Types::STRING, :name => 'homeTown', :optional => true},
341
+ COUNTRY => {:type => ::Thrift::Types::STRING, :name => 'country', :optional => true},
342
+ PROVINCE => {:type => ::Thrift::Types::STRING, :name => 'province', :optional => true},
343
+ CITY => {:type => ::Thrift::Types::STRING, :name => 'city', :optional => true},
344
+ TOWN => {:type => ::Thrift::Types::STRING, :name => 'town', :optional => true},
345
+ MOBILE => {:type => ::Thrift::Types::STRING, :name => 'mobile', :optional => true},
346
+ TELEPHONE => {:type => ::Thrift::Types::STRING, :name => 'telephone', :optional => true},
347
+ PROFESSION => {:type => ::Thrift::Types::STRING, :name => 'profession', :optional => true},
348
+ FINISHSCHOOL => {:type => ::Thrift::Types::STRING, :name => 'finishSchool', :optional => true},
349
+ PERSONALHOMEPAGE => {:type => ::Thrift::Types::STRING, :name => 'personalHomepage', :optional => true},
350
+ PERSONALCOMMENT => {:type => ::Thrift::Types::STRING, :name => 'personalComment', :optional => true},
351
+ PERSONALSIGNATURE => {:type => ::Thrift::Types::STRING, :name => 'personalSignature', :optional => true},
352
+ LOGOPIC => {:type => ::Thrift::Types::STRING, :name => 'logoPic', :optional => true},
353
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
354
354
  CREATETIME => {:type => ::Thrift::Types::I64, :name => 'createTime'},
355
355
  LASTMODIFYTIME => {:type => ::Thrift::Types::I64, :name => 'lastModifyTime'},
356
- CONTACTADDRESS => {:type => ::Thrift::Types::STRING, :name => 'contactAddress'},
357
- CONTACTEMAIL => {:type => ::Thrift::Types::STRING, :name => 'contactEmail'},
358
- QQ => {:type => ::Thrift::Types::STRING, :name => 'qq'},
359
- MSN => {:type => ::Thrift::Types::STRING, :name => 'msn'},
360
- STATUS => {:type => ::Thrift::Types::STRING, :name => 'status'},
356
+ CONTACTADDRESS => {:type => ::Thrift::Types::STRING, :name => 'contactAddress', :optional => true},
357
+ CONTACTEMAIL => {:type => ::Thrift::Types::STRING, :name => 'contactEmail', :optional => true},
358
+ QQ => {:type => ::Thrift::Types::STRING, :name => 'qq', :optional => true},
359
+ MSN => {:type => ::Thrift::Types::STRING, :name => 'msn', :optional => true},
360
+ STATUS => {:type => ::Thrift::Types::STRING, :name => 'status', :optional => true},
361
361
  SUBEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'subEmail'},
362
362
  SUITID => {:type => ::Thrift::Types::I32, :name => 'suitId'},
363
363
  THIRDPARTYUSERID => {:type => ::Thrift::Types::I64, :name => 'thirdpartyUserId'},
364
- WEIBONAME => {:type => ::Thrift::Types::STRING, :name => 'weiboName'},
365
- LARGEPIC => {:type => ::Thrift::Types::STRING, :name => 'largePic'},
366
- MIDDLEPIC => {:type => ::Thrift::Types::STRING, :name => 'middlePic'},
367
- SMALLPIC => {:type => ::Thrift::Types::STRING, :name => 'smallPic'},
364
+ WEIBONAME => {:type => ::Thrift::Types::STRING, :name => 'weiboName', :optional => true},
365
+ LARGEPIC => {:type => ::Thrift::Types::STRING, :name => 'largePic', :optional => true},
366
+ MIDDLEPIC => {:type => ::Thrift::Types::STRING, :name => 'middlePic', :optional => true},
367
+ SMALLPIC => {:type => ::Thrift::Types::STRING, :name => 'smallPic', :optional => true},
368
368
  ISCOMPLETED => {:type => ::Thrift::Types::BOOL, :name => 'isCompleted'},
369
369
  ISROBOT => {:type => ::Thrift::Types::BOOL, :name => 'isRobot'},
370
370
  ISVERIFIED => {:type => ::Thrift::Types::BOOL, :name => 'isVerified'},
371
371
  ISBLACKLISTED => {:type => ::Thrift::Types::BOOL, :name => 'isBlacklisted'},
372
372
  ISDELETED => {:type => ::Thrift::Types::BOOL, :name => 'isDeleted'},
373
- REGISTEREDIP => {:type => ::Thrift::Types::STRING, :name => 'registeredIp'},
373
+ REGISTEREDIP => {:type => ::Thrift::Types::STRING, :name => 'registeredIp', :optional => true},
374
374
  ISVEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'isVEmail'},
375
375
  ISVMOBILE => {:type => ::Thrift::Types::BOOL, :name => 'isVMobile'},
376
376
  LASTTRACKID => {:type => ::Thrift::Types::I64, :name => 'lastTrackId'},
377
- REALNAME => {:type => ::Thrift::Types::STRING, :name => 'realName'},
378
- IDENTIFICATION => {:type => ::Thrift::Types::STRING, :name => 'identification'},
377
+ REALNAME => {:type => ::Thrift::Types::STRING, :name => 'realName', :optional => true},
378
+ IDENTIFICATION => {:type => ::Thrift::Types::STRING, :name => 'identification', :optional => true},
379
379
  IDENTIFICATIONTYPE => {:type => ::Thrift::Types::I16, :name => 'identificationType'},
380
380
  ISLOGINBAN => {:type => ::Thrift::Types::BOOL, :name => 'isLoginBan'},
381
381
  LOGINBANSTART => {:type => ::Thrift::Types::I64, :name => 'loginBanStart'},
382
382
  LOGINBANEND => {:type => ::Thrift::Types::I64, :name => 'loginBanEnd'},
383
- PTITLE => {:type => ::Thrift::Types::STRING, :name => 'ptitle'},
383
+ PTITLE => {:type => ::Thrift::Types::STRING, :name => 'ptitle', :optional => true},
384
384
  TASKCOMPLETEPROFILE => {:type => ::Thrift::Types::BOOL, :name => 'taskCompleteProfile'},
385
385
  TASKFOLLOW => {:type => ::Thrift::Types::BOOL, :name => 'taskFollow'},
386
386
  TASKDOWNLOADAPP => {:type => ::Thrift::Types::BOOL, :name => 'taskDownloadApp'},
387
387
  TASKEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'taskEmail'},
388
388
  ISGUIDECOMPLETED => {:type => ::Thrift::Types::BOOL, :name => 'isGuideCompleted'},
389
- VCOMPANY => {:type => ::Thrift::Types::STRING, :name => 'vCompany'},
390
- VTAGS => {:type => ::Thrift::Types::STRING, :name => 'vTags'},
389
+ VCOMPANY => {:type => ::Thrift::Types::STRING, :name => 'vCompany', :optional => true},
390
+ VTAGS => {:type => ::Thrift::Types::STRING, :name => 'vTags', :optional => true},
391
391
  VCATEGORYID => {:type => ::Thrift::Types::I32, :name => 'vCategoryId'},
392
- REGISTERCATEGORY => {:type => ::Thrift::Types::STRING, :name => 'registerCategory'},
392
+ REGISTERCATEGORY => {:type => ::Thrift::Types::STRING, :name => 'registerCategory', :optional => true},
393
393
  REGISTERCLIENTTYPE => {:type => ::Thrift::Types::I16, :name => 'registerClientType'},
394
394
  THIRDPARTYID => {:type => ::Thrift::Types::I64, :name => 'thirdpartyId'},
395
- PERSONDESCRIBE => {:type => ::Thrift::Types::STRING, :name => 'personDescribe'},
395
+ PERSONDESCRIBE => {:type => ::Thrift::Types::STRING, :name => 'personDescribe', :optional => true},
396
396
  GUIDEPLAYPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guidePlayPanel'},
397
397
  GUIDEVOICEPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guideVoicePanel'},
398
398
  GUIDESHAREPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guideSharePanel'},
399
- BACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'backgroundPic'},
400
- WEBBACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'webBackgroundPic'},
399
+ BACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'backgroundPic', :optional => true},
400
+ WEBBACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'webBackgroundPic', :optional => true},
401
401
  WEBBACKGROUNDPICPOSITIONY => {:type => ::Thrift::Types::DOUBLE, :name => 'webBackgroundPicPositionY'},
402
402
  WEBBACKGROUNDPICPOSITIONX => {:type => ::Thrift::Types::DOUBLE, :name => 'webBackgroundPicPositionX'}
403
403
  }
@@ -456,42 +456,42 @@ module Passport
456
456
 
457
457
  FIELDS = {
458
458
  UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
459
- NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname'},
460
- LOGOPIC => {:type => ::Thrift::Types::STRING, :name => 'logoPic'},
461
- BACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'backgroundPic'},
462
- WEBBACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'webBackgroundPic'},
459
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
460
+ LOGOPIC => {:type => ::Thrift::Types::STRING, :name => 'logoPic', :optional => true},
461
+ BACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'backgroundPic', :optional => true},
462
+ WEBBACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'webBackgroundPic', :optional => true},
463
463
  WEBBACKGROUNDPICPOSITIONX => {:type => ::Thrift::Types::DOUBLE, :name => 'webBackgroundPicPositionX'},
464
464
  WEBBACKGROUNDPICPOSITIONY => {:type => ::Thrift::Types::DOUBLE, :name => 'webBackgroundPicPositionY'},
465
- EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email'},
466
- ACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'account'},
467
- MOBILE => {:type => ::Thrift::Types::STRING, :name => 'mobile'},
468
- THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName'},
465
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
466
+ ACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'account', :optional => true},
467
+ MOBILE => {:type => ::Thrift::Types::STRING, :name => 'mobile', :optional => true},
468
+ THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName', :optional => true},
469
469
  ISVERIFIED => {:type => ::Thrift::Types::BOOL, :name => 'isVerified'},
470
470
  ISCOMPLETED => {:type => ::Thrift::Types::BOOL, :name => 'isCompleted'},
471
471
  ISVEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'isVEmail'},
472
472
  ISVMOBILE => {:type => ::Thrift::Types::BOOL, :name => 'isVMobile'},
473
473
  ISROBOT => {:type => ::Thrift::Types::BOOL, :name => 'isRobot'},
474
- PROVINCE => {:type => ::Thrift::Types::STRING, :name => 'province'},
475
- CITY => {:type => ::Thrift::Types::STRING, :name => 'city'},
476
- TOWN => {:type => ::Thrift::Types::STRING, :name => 'town'},
477
- COUNTRY => {:type => ::Thrift::Types::STRING, :name => 'country'},
478
- PERSONALSIGNATURE => {:type => ::Thrift::Types::STRING, :name => 'personalSignature'},
479
- PTITLE => {:type => ::Thrift::Types::STRING, :name => 'ptitle'},
474
+ PROVINCE => {:type => ::Thrift::Types::STRING, :name => 'province', :optional => true},
475
+ CITY => {:type => ::Thrift::Types::STRING, :name => 'city', :optional => true},
476
+ TOWN => {:type => ::Thrift::Types::STRING, :name => 'town', :optional => true},
477
+ COUNTRY => {:type => ::Thrift::Types::STRING, :name => 'country', :optional => true},
478
+ PERSONALSIGNATURE => {:type => ::Thrift::Types::STRING, :name => 'personalSignature', :optional => true},
479
+ PTITLE => {:type => ::Thrift::Types::STRING, :name => 'ptitle', :optional => true},
480
480
  ISGUIDECOMPLETED => {:type => ::Thrift::Types::BOOL, :name => 'isGuideCompleted'},
481
481
  TASKCOMPLETEPROFILE => {:type => ::Thrift::Types::BOOL, :name => 'taskCompleteProfile'},
482
482
  TASKFOLLOW => {:type => ::Thrift::Types::BOOL, :name => 'taskFollow'},
483
483
  TASKDOWNLOADAPP => {:type => ::Thrift::Types::BOOL, :name => 'taskDownloadApp'},
484
484
  TASKEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'taskEmail'},
485
- VCOMPANY => {:type => ::Thrift::Types::STRING, :name => 'vCompany'},
486
- VTAGS => {:type => ::Thrift::Types::STRING, :name => 'vTags'},
485
+ VCOMPANY => {:type => ::Thrift::Types::STRING, :name => 'vCompany', :optional => true},
486
+ VTAGS => {:type => ::Thrift::Types::STRING, :name => 'vTags', :optional => true},
487
487
  VCATEGORYID => {:type => ::Thrift::Types::I32, :name => 'vCategoryId'},
488
488
  CREATEDTIME => {:type => ::Thrift::Types::I64, :name => 'createdTime'},
489
489
  ISLOGINBAN => {:type => ::Thrift::Types::BOOL, :name => 'isLoginBan'},
490
490
  LOGINBANSTART => {:type => ::Thrift::Types::I64, :name => 'loginBanStart'},
491
491
  LOGINBANEND => {:type => ::Thrift::Types::I64, :name => 'loginBanEnd'},
492
492
  ISDELETED => {:type => ::Thrift::Types::BOOL, :name => 'isDeleted'},
493
- REGISTERCATEGORY => {:type => ::Thrift::Types::STRING, :name => 'registerCategory'},
494
- PERSONDESCRIBE => {:type => ::Thrift::Types::STRING, :name => 'personDescribe'},
493
+ REGISTERCATEGORY => {:type => ::Thrift::Types::STRING, :name => 'registerCategory', :optional => true},
494
+ PERSONDESCRIBE => {:type => ::Thrift::Types::STRING, :name => 'personDescribe', :optional => true},
495
495
  GUIDEPLAYPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guidePlayPanel'},
496
496
  GUIDEVOICEPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guideVoicePanel'},
497
497
  GUIDESHAREPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guideSharePanel'},
@@ -542,7 +542,7 @@ module Passport
542
542
  ERRORCODE = 1
543
543
 
544
544
  FIELDS = {
545
- ERRORCODE => {:type => ::Thrift::Types::STRING, :name => 'errorCode'}
545
+ ERRORCODE => {:type => ::Thrift::Types::STRING, :name => 'errorCode', :optional => true}
546
546
  }
547
547
 
548
548
  def struct_fields; FIELDS; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passport_thrift_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - rick