Class: Evernote::EDAM::UserStore::UserStore::Processor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Processor
Defined in:
lib/Evernote/EDAM/user_store.rb

Instance Method Summary collapse

Methods included from Thrift::Processor

#initialize, #process, #read_args, #write_result

Instance Method Details

#process_authenticate(seqid, iprot, oprot) ⇒ Object



236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/Evernote/EDAM/user_store.rb', line 236

def process_authenticate(seqid, iprot, oprot)
  args = read_args(iprot, Authenticate_args)
  result = Authenticate_result.new()
  begin
    result.success = @handler.authenticate(args.username, args.password, args.consumerKey, args.consumerSecret, args.supportsTwoFactor)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'authenticate', seqid)
end

#process_authenticateLongSession(seqid, iprot, oprot) ⇒ Object



249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/Evernote/EDAM/user_store.rb', line 249

def process_authenticateLongSession(seqid, iprot, oprot)
  args = read_args(iprot, AuthenticateLongSession_args)
  result = AuthenticateLongSession_result.new()
  begin
    result.success = @handler.authenticateLongSession(args.username, args.password, args.consumerKey, args.consumerSecret, args.deviceIdentifier, args.deviceDescription, args.supportsTwoFactor)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'authenticateLongSession', seqid)
end

#process_authenticateToBusiness(seqid, iprot, oprot) ⇒ Object



288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/Evernote/EDAM/user_store.rb', line 288

def process_authenticateToBusiness(seqid, iprot, oprot)
  args = read_args(iprot, AuthenticateToBusiness_args)
  result = AuthenticateToBusiness_result.new()
  begin
    result.success = @handler.authenticateToBusiness(args.authenticationToken)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'authenticateToBusiness', seqid)
end

#process_checkVersion(seqid, iprot, oprot) ⇒ Object



222
223
224
225
226
227
# File 'lib/Evernote/EDAM/user_store.rb', line 222

def process_checkVersion(seqid, iprot, oprot)
  args = read_args(iprot, CheckVersion_args)
  result = CheckVersion_result.new()
  result.success = @handler.checkVersion(args.clientName, args.edamVersionMajor, args.edamVersionMinor)
  write_result(result, oprot, 'checkVersion', seqid)
end

#process_completeTwoFactorAuthentication(seqid, iprot, oprot) ⇒ Object



262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/Evernote/EDAM/user_store.rb', line 262

def process_completeTwoFactorAuthentication(seqid, iprot, oprot)
  args = read_args(iprot, CompleteTwoFactorAuthentication_args)
  result = CompleteTwoFactorAuthentication_result.new()
  begin
    result.success = @handler.completeTwoFactorAuthentication(args.authenticationToken, args.oneTimeCode, args.deviceIdentifier, args.deviceDescription)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'completeTwoFactorAuthentication', seqid)
end

#process_getBootstrapInfo(seqid, iprot, oprot) ⇒ Object



229
230
231
232
233
234
# File 'lib/Evernote/EDAM/user_store.rb', line 229

def process_getBootstrapInfo(seqid, iprot, oprot)
  args = read_args(iprot, GetBootstrapInfo_args)
  result = GetBootstrapInfo_result.new()
  result.success = @handler.getBootstrapInfo(args.locale)
  write_result(result, oprot, 'getBootstrapInfo', seqid)
end

#process_getNoteStoreUrl(seqid, iprot, oprot) ⇒ Object



355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/Evernote/EDAM/user_store.rb', line 355

def process_getNoteStoreUrl(seqid, iprot, oprot)
  args = read_args(iprot, GetNoteStoreUrl_args)
  result = GetNoteStoreUrl_result.new()
  begin
    result.success = @handler.getNoteStoreUrl(args.authenticationToken)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'getNoteStoreUrl', seqid)
end

#process_getPremiumInfo(seqid, iprot, oprot) ⇒ Object



342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/Evernote/EDAM/user_store.rb', line 342

def process_getPremiumInfo(seqid, iprot, oprot)
  args = read_args(iprot, GetPremiumInfo_args)
  result = GetPremiumInfo_result.new()
  begin
    result.success = @handler.getPremiumInfo(args.authenticationToken)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'getPremiumInfo', seqid)
end

#process_getPublicUserInfo(seqid, iprot, oprot) ⇒ Object



327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/Evernote/EDAM/user_store.rb', line 327

def process_getPublicUserInfo(seqid, iprot, oprot)
  args = read_args(iprot, GetPublicUserInfo_args)
  result = GetPublicUserInfo_result.new()
  begin
    result.success = @handler.getPublicUserInfo(args.username)
  rescue ::Evernote::EDAM::Error::EDAMNotFoundException => notFoundException
    result.notFoundException = notFoundException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  end
  write_result(result, oprot, 'getPublicUserInfo', seqid)
end

#process_getUser(seqid, iprot, oprot) ⇒ Object



314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/Evernote/EDAM/user_store.rb', line 314

def process_getUser(seqid, iprot, oprot)
  args = read_args(iprot, GetUser_args)
  result = GetUser_result.new()
  begin
    result.success = @handler.getUser(args.authenticationToken)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'getUser', seqid)
end

#process_refreshAuthentication(seqid, iprot, oprot) ⇒ Object



301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/Evernote/EDAM/user_store.rb', line 301

def process_refreshAuthentication(seqid, iprot, oprot)
  args = read_args(iprot, RefreshAuthentication_args)
  result = RefreshAuthentication_result.new()
  begin
    result.success = @handler.refreshAuthentication(args.authenticationToken)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'refreshAuthentication', seqid)
end

#process_revokeLongSession(seqid, iprot, oprot) ⇒ Object



275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/Evernote/EDAM/user_store.rb', line 275

def process_revokeLongSession(seqid, iprot, oprot)
  args = read_args(iprot, RevokeLongSession_args)
  result = RevokeLongSession_result.new()
  begin
    @handler.revokeLongSession(args.authenticationToken)
  rescue ::Evernote::EDAM::Error::EDAMUserException => userException
    result.userException = userException
  rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
    result.systemException = systemException
  end
  write_result(result, oprot, 'revokeLongSession', seqid)
end