evernote-thrift 1.22.2 → 1.23.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -61,6 +61,40 @@ require 'user_store_types'
61
61
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticate failed: unknown result')
62
62
  end
63
63
 
64
+ def authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription)
65
+ send_authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription)
66
+ return recv_authenticateLongSession()
67
+ end
68
+
69
+ def send_authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription)
70
+ send_message('authenticateLongSession', AuthenticateLongSession_args, :username => username, :password => password, :consumerKey => consumerKey, :consumerSecret => consumerSecret, :deviceIdentifier => deviceIdentifier, :deviceDescription => deviceDescription)
71
+ end
72
+
73
+ def recv_authenticateLongSession()
74
+ result = receive_message(AuthenticateLongSession_result)
75
+ return result.success unless result.success.nil?
76
+ raise result.userException unless result.userException.nil?
77
+ raise result.systemException unless result.systemException.nil?
78
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticateLongSession failed: unknown result')
79
+ end
80
+
81
+ def authenticateToBusiness(authenticationToken)
82
+ send_authenticateToBusiness(authenticationToken)
83
+ return recv_authenticateToBusiness()
84
+ end
85
+
86
+ def send_authenticateToBusiness(authenticationToken)
87
+ send_message('authenticateToBusiness', AuthenticateToBusiness_args, :authenticationToken => authenticationToken)
88
+ end
89
+
90
+ def recv_authenticateToBusiness()
91
+ result = receive_message(AuthenticateToBusiness_result)
92
+ return result.success unless result.success.nil?
93
+ raise result.userException unless result.userException.nil?
94
+ raise result.systemException unless result.systemException.nil?
95
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticateToBusiness failed: unknown result')
96
+ end
97
+
64
98
  def refreshAuthentication(authenticationToken)
65
99
  send_refreshAuthentication(authenticationToken)
66
100
  return recv_refreshAuthentication()
@@ -179,6 +213,32 @@ require 'user_store_types'
179
213
  write_result(result, oprot, 'authenticate', seqid)
180
214
  end
181
215
 
216
+ def process_authenticateLongSession(seqid, iprot, oprot)
217
+ args = read_args(iprot, AuthenticateLongSession_args)
218
+ result = AuthenticateLongSession_result.new()
219
+ begin
220
+ result.success = @handler.authenticateLongSession(args.username, args.password, args.consumerKey, args.consumerSecret, args.deviceIdentifier, args.deviceDescription)
221
+ rescue Evernote::EDAM::Error::EDAMUserException => userException
222
+ result.userException = userException
223
+ rescue Evernote::EDAM::Error::EDAMSystemException => systemException
224
+ result.systemException = systemException
225
+ end
226
+ write_result(result, oprot, 'authenticateLongSession', seqid)
227
+ end
228
+
229
+ def process_authenticateToBusiness(seqid, iprot, oprot)
230
+ args = read_args(iprot, AuthenticateToBusiness_args)
231
+ result = AuthenticateToBusiness_result.new()
232
+ begin
233
+ result.success = @handler.authenticateToBusiness(args.authenticationToken)
234
+ rescue Evernote::EDAM::Error::EDAMUserException => userException
235
+ result.userException = userException
236
+ rescue Evernote::EDAM::Error::EDAMSystemException => systemException
237
+ result.systemException = systemException
238
+ end
239
+ write_result(result, oprot, 'authenticateToBusiness', seqid)
240
+ end
241
+
182
242
  def process_refreshAuthentication(seqid, iprot, oprot)
183
243
  args = read_args(iprot, RefreshAuthentication_args)
184
244
  result = RefreshAuthentication_result.new()
@@ -259,7 +319,7 @@ require 'user_store_types'
259
319
  FIELDS = {
260
320
  CLIENTNAME => {:type => ::Thrift::Types::STRING, :name => 'clientName'},
261
321
  EDAMVERSIONMAJOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMajor', :default => 1},
262
- EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 22}
322
+ EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 23}
263
323
  }
264
324
 
265
325
  def struct_fields; FIELDS; end
@@ -360,6 +420,88 @@ require 'user_store_types'
360
420
  ::Thrift::Struct.generate_accessors self
361
421
  end
362
422
 
423
+ class AuthenticateLongSession_args
424
+ include ::Thrift::Struct, ::Thrift::Struct_Union
425
+ USERNAME = 1
426
+ PASSWORD = 2
427
+ CONSUMERKEY = 3
428
+ CONSUMERSECRET = 4
429
+ DEVICEIDENTIFIER = 5
430
+ DEVICEDESCRIPTION = 6
431
+
432
+ FIELDS = {
433
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
434
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
435
+ CONSUMERKEY => {:type => ::Thrift::Types::STRING, :name => 'consumerKey'},
436
+ CONSUMERSECRET => {:type => ::Thrift::Types::STRING, :name => 'consumerSecret'},
437
+ DEVICEIDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'deviceIdentifier'},
438
+ DEVICEDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'deviceDescription'}
439
+ }
440
+
441
+ def struct_fields; FIELDS; end
442
+
443
+ def validate
444
+ end
445
+
446
+ ::Thrift::Struct.generate_accessors self
447
+ end
448
+
449
+ class AuthenticateLongSession_result
450
+ include ::Thrift::Struct, ::Thrift::Struct_Union
451
+ SUCCESS = 0
452
+ USEREXCEPTION = 1
453
+ SYSTEMEXCEPTION = 2
454
+
455
+ FIELDS = {
456
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Evernote::EDAM::UserStore::AuthenticationResult},
457
+ USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => Evernote::EDAM::Error::EDAMUserException},
458
+ SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => Evernote::EDAM::Error::EDAMSystemException}
459
+ }
460
+
461
+ def struct_fields; FIELDS; end
462
+
463
+ def validate
464
+ end
465
+
466
+ ::Thrift::Struct.generate_accessors self
467
+ end
468
+
469
+ class AuthenticateToBusiness_args
470
+ include ::Thrift::Struct, ::Thrift::Struct_Union
471
+ AUTHENTICATIONTOKEN = 1
472
+
473
+ FIELDS = {
474
+ AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
475
+ }
476
+
477
+ def struct_fields; FIELDS; end
478
+
479
+ def validate
480
+ end
481
+
482
+ ::Thrift::Struct.generate_accessors self
483
+ end
484
+
485
+ class AuthenticateToBusiness_result
486
+ include ::Thrift::Struct, ::Thrift::Struct_Union
487
+ SUCCESS = 0
488
+ USEREXCEPTION = 1
489
+ SYSTEMEXCEPTION = 2
490
+
491
+ FIELDS = {
492
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Evernote::EDAM::UserStore::AuthenticationResult},
493
+ USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => Evernote::EDAM::Error::EDAMUserException},
494
+ SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => Evernote::EDAM::Error::EDAMSystemException}
495
+ }
496
+
497
+ def struct_fields; FIELDS; end
498
+
499
+ def validate
500
+ end
501
+
502
+ ::Thrift::Struct.generate_accessors self
503
+ end
504
+
363
505
  class RefreshAuthentication_args
364
506
  include ::Thrift::Struct, ::Thrift::Struct_Union
365
507
  AUTHENTICATIONTOKEN = 1
@@ -493,7 +635,7 @@ require 'user_store_types'
493
635
  SYSTEMEXCEPTION = 2
494
636
 
495
637
  FIELDS = {
496
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Evernote::EDAM::UserStore::PremiumInfo},
638
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Evernote::EDAM::Type::PremiumInfo},
497
639
  USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => Evernote::EDAM::Error::EDAMUserException},
498
640
  SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => Evernote::EDAM::Error::EDAMSystemException}
499
641
  }
@@ -11,7 +11,7 @@ require 'user_store_types'
11
11
  module UserStore
12
12
  EDAM_VERSION_MAJOR = 1
13
13
 
14
- EDAM_VERSION_MINOR = 22
14
+ EDAM_VERSION_MINOR = 23
15
15
 
16
16
  end
17
17
  end
@@ -11,14 +11,6 @@ require 'errors_types'
11
11
  module Evernote
12
12
  module EDAM
13
13
  module UserStore
14
- module SponsoredGroupRole
15
- GROUP_MEMBER = 1
16
- GROUP_ADMIN = 2
17
- GROUP_OWNER = 3
18
- VALUE_MAP = {1 => "GROUP_MEMBER", 2 => "GROUP_ADMIN", 3 => "GROUP_OWNER"}
19
- VALID_VALUES = Set.new([GROUP_MEMBER, GROUP_ADMIN, GROUP_OWNER]).freeze
20
- end
21
-
22
14
  # This structure is used to provide publicly-available user information
23
15
  # about a particular account.
24
16
  # <dl>
@@ -28,9 +20,7 @@ module Evernote
28
20
  # </dd>
29
21
  # <dt>shardId:</dt>
30
22
  # <dd>
31
- # The name of the virtual server that manages the state of
32
- # this user. This value is used internally to determine which system should
33
- # service requests about this user's data.
23
+ # DEPRECATED - Client applications should have no need to use this field.
34
24
  # </dd>
35
25
  # <dt>privilege:</dt>
36
26
  # <dd>
@@ -44,6 +34,16 @@ module Evernote
44
34
  # I.e. this is the URL that should be used to create the Thrift HTTP client
45
35
  # transport to send messages to the NoteStore service for the account.
46
36
  # </dd>
37
+ # <dt>webApiUrlPrefix:</dt>
38
+ # <dd>
39
+ # This field will contain the initial part of the URLs that should be used
40
+ # to make requests to Evernote's thin client "web API", which provide
41
+ # optimized operations for clients that aren't capable of manipulating
42
+ # the full contents of accounts via the full Thrift data model. Clients
43
+ # should concatenate the relative path for the various servlets onto the
44
+ # end of this string to construct the full URL, as documented on our
45
+ # developer web site.
46
+ # </dd>
47
47
  # </dl>
48
48
  class PublicUserInfo
49
49
  include ::Thrift::Struct, ::Thrift::Struct_Union
@@ -52,13 +52,15 @@ module Evernote
52
52
  PRIVILEGE = 3
53
53
  USERNAME = 4
54
54
  NOTESTOREURL = 5
55
+ WEBAPIURLPREFIX = 6
55
56
 
56
57
  FIELDS = {
57
58
  USERID => {:type => ::Thrift::Types::I32, :name => 'userId'},
58
59
  SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId'},
59
60
  PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::PrivilegeLevel},
60
61
  USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
61
- NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true}
62
+ NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true},
63
+ WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true}
62
64
  }
63
65
 
64
66
  def struct_fields; FIELDS; end
@@ -74,107 +76,6 @@ module Evernote
74
76
  ::Thrift::Struct.generate_accessors self
75
77
  end
76
78
 
77
- # This structure is used to provide information about a user's Premium account.
78
- # <dl>
79
- # <dt>currentTime:</dt>
80
- # <dd>
81
- # The server-side date and time when this data was generated.
82
- # </dd>
83
- # <dt>premium:</dt>
84
- # <dd>
85
- # True if the user's account is Premium.
86
- # </dd>
87
- # <dt>premiumRecurring</dt>
88
- # <dd>
89
- # True if the user's account is Premium and has a recurring payment method.
90
- # </dd>
91
- # <dt>premiumExpirationDate:</dt>
92
- # <dd>
93
- # The date when the user's Premium account expires, or the date when the
94
- # user's account will be charged if it has a recurring payment method.
95
- # </dd>
96
- # <dt>premiumExtendable:</dt>
97
- # <dd>
98
- # True if the user is eligible for purchasing Premium account extensions.
99
- # </dd>
100
- # <dt>premiumPending:</dt>
101
- # <dd>
102
- # True if the user's Premium account is pending payment confirmation
103
- # </dd>
104
- # <dt>premiumCancellationPending:</dt>
105
- # <dd>
106
- # True if the user has requested that no further charges to be made; the
107
- # Premium account will remain active until it expires.
108
- # </dd>
109
- # <dt>canPurchaseUploadAllowance:</dt>
110
- # <dd>
111
- # True if the user is eligible for purchasing additional upload allowance.
112
- # </dd>
113
- # <dt>sponsoredGroupName:</dt>
114
- # <dd>
115
- # The name of the sponsored group that the user is part of.
116
- # </dd>
117
- # <dt>sponsoredGroupRole:</dt>
118
- # <dd>
119
- # The role of the user within a sponsored group.
120
- # </dd>
121
- # <dt>businessName:</dt>
122
- # <dd>
123
- # The name of the business that the user is associated with.
124
- # </dd>
125
- # <dt>businessAdmin:</dt>
126
- # <dd>
127
- # True if the user is the administrator of the business.
128
- # </dd>
129
- # </dl>
130
- class PremiumInfo
131
- include ::Thrift::Struct, ::Thrift::Struct_Union
132
- CURRENTTIME = 1
133
- PREMIUM = 2
134
- PREMIUMRECURRING = 3
135
- PREMIUMEXPIRATIONDATE = 4
136
- PREMIUMEXTENDABLE = 5
137
- PREMIUMPENDING = 6
138
- PREMIUMCANCELLATIONPENDING = 7
139
- CANPURCHASEUPLOADALLOWANCE = 8
140
- SPONSOREDGROUPNAME = 9
141
- SPONSOREDGROUPROLE = 10
142
- BUSINESSNAME = 11
143
- BUSINESSADMIN = 12
144
-
145
- FIELDS = {
146
- CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
147
- PREMIUM => {:type => ::Thrift::Types::BOOL, :name => 'premium'},
148
- PREMIUMRECURRING => {:type => ::Thrift::Types::BOOL, :name => 'premiumRecurring'},
149
- PREMIUMEXPIRATIONDATE => {:type => ::Thrift::Types::I64, :name => 'premiumExpirationDate', :optional => true},
150
- PREMIUMEXTENDABLE => {:type => ::Thrift::Types::BOOL, :name => 'premiumExtendable'},
151
- PREMIUMPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumPending'},
152
- PREMIUMCANCELLATIONPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumCancellationPending'},
153
- CANPURCHASEUPLOADALLOWANCE => {:type => ::Thrift::Types::BOOL, :name => 'canPurchaseUploadAllowance'},
154
- SPONSOREDGROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'sponsoredGroupName', :optional => true},
155
- SPONSOREDGROUPROLE => {:type => ::Thrift::Types::I32, :name => 'sponsoredGroupRole', :optional => true, :enum_class => Evernote::EDAM::UserStore::SponsoredGroupRole},
156
- BUSINESSNAME => {:type => ::Thrift::Types::STRING, :name => 'businessName', :optional => true},
157
- BUSINESSADMIN => {:type => ::Thrift::Types::BOOL, :name => 'businessAdmin', :optional => true}
158
- }
159
-
160
- def struct_fields; FIELDS; end
161
-
162
- def validate
163
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
164
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premium is unset!') if @premium.nil?
165
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumRecurring is unset!') if @premiumRecurring.nil?
166
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumExtendable is unset!') if @premiumExtendable.nil?
167
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumPending is unset!') if @premiumPending.nil?
168
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumCancellationPending is unset!') if @premiumCancellationPending.nil?
169
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field canPurchaseUploadAllowance is unset!') if @canPurchaseUploadAllowance.nil?
170
- unless @sponsoredGroupRole.nil? || Evernote::EDAM::UserStore::SponsoredGroupRole::VALID_VALUES.include?(@sponsoredGroupRole)
171
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field sponsoredGroupRole!')
172
- end
173
- end
174
-
175
- ::Thrift::Struct.generate_accessors self
176
- end
177
-
178
79
  # When an authentication (or re-authentication) is performed, this structure
179
80
  # provides the result to the client.
180
81
  # <dl>
@@ -327,6 +228,7 @@ module Evernote
327
228
  ENABLESPONSOREDACCOUNTS = 10
328
229
  ENABLETWITTERSHARING = 11
329
230
  ENABLELINKEDINSHARING = 12
231
+ ENABLEPUBLICNOTEBOOKS = 13
330
232
 
331
233
  FIELDS = {
332
234
  SERVICEHOST => {:type => ::Thrift::Types::STRING, :name => 'serviceHost'},
@@ -340,7 +242,8 @@ module Evernote
340
242
  ENABLESINGLENOTESHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableSingleNoteSharing', :optional => true},
341
243
  ENABLESPONSOREDACCOUNTS => {:type => ::Thrift::Types::BOOL, :name => 'enableSponsoredAccounts', :optional => true},
342
244
  ENABLETWITTERSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableTwitterSharing', :optional => true},
343
- ENABLELINKEDINSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableLinkedInSharing', :optional => true}
245
+ ENABLELINKEDINSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableLinkedInSharing', :optional => true},
246
+ ENABLEPUBLICNOTEBOOKS => {:type => ::Thrift::Types::BOOL, :name => 'enablePublicNotebooks', :optional => true}
344
247
  }
345
248
 
346
249
  def struct_fields; FIELDS; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evernote-thrift
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.22.2
4
+ version: 1.23.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-21 00:00:00.000000000 Z
12
+ date: 2012-12-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This SDK contains wrapper code used to call the Evernote Cloud API from
15
15
  Ruby.