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



169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/Evernote/EDAM/user_store.rb', line 169

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)
  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_checkVersion(seqid, iprot, oprot) ⇒ Object



155
156
157
158
159
160
# File 'lib/Evernote/EDAM/user_store.rb', line 155

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_getBootstrapInfo(seqid, iprot, oprot) ⇒ Object



162
163
164
165
166
167
# File 'lib/Evernote/EDAM/user_store.rb', line 162

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



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

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



223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/Evernote/EDAM/user_store.rb', line 223

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



208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/Evernote/EDAM/user_store.rb', line 208

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



195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/Evernote/EDAM/user_store.rb', line 195

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



182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/Evernote/EDAM/user_store.rb', line 182

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