evernote_oauth 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,18 +0,0 @@
1
- #
2
- # Autogenerated by Thrift Compiler (0.8.0)
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- require 'user_store_types'
8
-
9
- module Evernote
10
- module EDAM
11
- module UserStore
12
- EDAM_VERSION_MAJOR = 1
13
-
14
- EDAM_VERSION_MINOR = 21
15
-
16
- end
17
- end
18
- end
@@ -1,415 +0,0 @@
1
- #
2
- # Autogenerated by Thrift Compiler (0.8.0)
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- require 'types_types'
8
- require 'errors_types'
9
-
10
-
11
- module Evernote
12
- module EDAM
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
- # This structure is used to provide publicly-available user information
23
- # about a particular account.
24
- # <dl>
25
- # <dt>userId:</dt>
26
- # <dd>
27
- # The unique numeric user identifier for the user account.
28
- # </dd>
29
- # <dt>shardId:</dt>
30
- # <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.
34
- # </dd>
35
- # <dt>privilege:</dt>
36
- # <dd>
37
- # The privilege level of the account, to determine whether
38
- # this is a Premium or Free account.
39
- # </dd>
40
- # <dt>noteStoreUrl:</dt>
41
- # <dd>
42
- # This field will contain the full URL that clients should use to make
43
- # NoteStore requests to the server shard that contains that user's data.
44
- # I.e. this is the URL that should be used to create the Thrift HTTP client
45
- # transport to send messages to the NoteStore service for the account.
46
- # </dd>
47
- # </dl>
48
- class PublicUserInfo
49
- include ::Thrift::Struct, ::Thrift::Struct_Union
50
- USERID = 1
51
- SHARDID = 2
52
- PRIVILEGE = 3
53
- USERNAME = 4
54
- NOTESTOREURL = 5
55
-
56
- FIELDS = {
57
- USERID => {:type => ::Thrift::Types::I32, :name => 'userId'},
58
- SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId'},
59
- PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::PrivilegeLevel},
60
- USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
61
- NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true}
62
- }
63
-
64
- def struct_fields; FIELDS; end
65
-
66
- def validate
67
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field userId is unset!') unless @userId
68
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field shardId is unset!') unless @shardId
69
- unless @privilege.nil? || Evernote::EDAM::Type::PrivilegeLevel::VALID_VALUES.include?(@privilege)
70
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
71
- end
72
- end
73
-
74
- ::Thrift::Struct.generate_accessors self
75
- end
76
-
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
- # When an authentication (or re-authentication) is performed, this structure
179
- # provides the result to the client.
180
- # <dl>
181
- # <dt>currentTime:</dt>
182
- # <dd>
183
- # The server-side date and time when this result was
184
- # generated.
185
- # </dd>
186
- # <dt>authenticationToken:</dt>
187
- # <dd>
188
- # Holds an opaque, ASCII-encoded token that can be
189
- # used by the client to perform actions on a NoteStore.
190
- # </dd>
191
- # <dt>expiration:</dt>
192
- # <dd>
193
- # Holds the server-side date and time when the
194
- # authentication token will expire.
195
- # This time can be compared to "currentTime" to produce an expiration
196
- # time that can be reconciled with the client's local clock.
197
- # </dd>
198
- # <dt>user:</dt>
199
- # <dd>
200
- # Holds the information about the account which was
201
- # authenticated if this was a full authentication. May be absent if this
202
- # particular authentication did not require user information.
203
- # </dd>
204
- # <dt>publicUserInfo:</dt>
205
- # <dd>
206
- # If this authentication result was achieved without full permissions to
207
- # access the full User structure, this field may be set to give back
208
- # a more limited public set of data.
209
- # </dd>
210
- # <dt>noteStoreUrl:</dt>
211
- # <dd>
212
- # This field will contain the full URL that clients should use to make
213
- # NoteStore requests to the server shard that contains that user's data.
214
- # I.e. this is the URL that should be used to create the Thrift HTTP client
215
- # transport to send messages to the NoteStore service for the account.
216
- # </dd>
217
- # <dt>webApiUrlPrefix:</dt>
218
- # <dd>
219
- # This field will contain the initial part of the URLs that should be used
220
- # to make requests to Evernote's thin client "web API", which provide
221
- # optimized operations for clients that aren't capable of manipulating
222
- # the full contents of accounts via the full Thrift data model. Clients
223
- # should concatenate the relative path for the various servlets onto the
224
- # end of this string to construct the full URL, as documented on our
225
- # developer web site.
226
- # </dd>
227
- # </dl>
228
- class AuthenticationResult
229
- include ::Thrift::Struct, ::Thrift::Struct_Union
230
- CURRENTTIME = 1
231
- AUTHENTICATIONTOKEN = 2
232
- EXPIRATION = 3
233
- USER = 4
234
- PUBLICUSERINFO = 5
235
- NOTESTOREURL = 6
236
- WEBAPIURLPREFIX = 7
237
-
238
- FIELDS = {
239
- CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
240
- AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'},
241
- EXPIRATION => {:type => ::Thrift::Types::I64, :name => 'expiration'},
242
- USER => {:type => ::Thrift::Types::STRUCT, :name => 'user', :class => Evernote::EDAM::Type::User, :optional => true},
243
- PUBLICUSERINFO => {:type => ::Thrift::Types::STRUCT, :name => 'publicUserInfo', :class => Evernote::EDAM::UserStore::PublicUserInfo, :optional => true},
244
- NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true},
245
- WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true}
246
- }
247
-
248
- def struct_fields; FIELDS; end
249
-
250
- def validate
251
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
252
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field authenticationToken is unset!') unless @authenticationToken
253
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expiration is unset!') unless @expiration
254
- end
255
-
256
- ::Thrift::Struct.generate_accessors self
257
- end
258
-
259
- # This structure describes a collection of bootstrap settings.
260
- # <dl>
261
- # <dt>serviceHost:</dt>
262
- # <dd>
263
- # The hostname and optional port for composing Evernote web service URLs.
264
- # This URL can be used to access the UserStore and related services,
265
- # but must not be used to compose the NoteStore URL. Client applications
266
- # must handle serviceHost values that include only the hostname
267
- # (e.g. www.evernote.com) or both the hostname and port (e.g. www.evernote.com:8080).
268
- # If no port is specified, or if port 443 is specified, client applications must
269
- # use the scheme "https" when composing URLs. Otherwise, a client must use the
270
- # scheme "http".
271
- # </dd>
272
- # <dt>marketingUrl:</dt>
273
- # <dd>
274
- # The URL stem for the Evernote corporate marketing website, e.g. http://www.evernote.com.
275
- # This stem can be used to compose website URLs. For example, the URL of the Evernote
276
- # Trunk is composed by appending "/about/trunk/" to the value of marketingUrl.
277
- # </dd>
278
- # <dt>supportUrl:</dt>
279
- # <dd>
280
- # The full URL for the Evernote customer support website, e.g. https://support.evernote.com.
281
- # </dd>
282
- # <dt>accountEmailDomain:</dt>
283
- # <dd>
284
- # The domain used for an Evernote user's incoming email address, which allows notes to
285
- # be emailed into an account. E.g. m.evernote.com.
286
- # </dd>
287
- # <dt>enableFacebookSharing:</dt>
288
- # <dd>
289
- # Whether the client application should enable sharing of notes on Facebook.
290
- # </dd>
291
- # <dt>enableGiftSubscriptions:</dt>
292
- # <dd>
293
- # Whether the client application should enable gift subscriptions.
294
- # </dd>
295
- # <dt>enableSupportTickets:</dt>
296
- # <dd>
297
- # Whether the client application should enable in-client creation of support tickets.
298
- # </dd>
299
- # <dt>enableSharedNotebooks:</dt>
300
- # <dd>
301
- # Whether the client application should enable shared notebooks.
302
- # </dd>
303
- # <dt>enableSingleNoteSharing:</dt>
304
- # <dd>
305
- # Whether the client application should enable single note sharing.
306
- # </dd>
307
- # <dt>enableSponsoredAccounts:</dt>
308
- # <dd>
309
- # Whether the client application should enable sponsored accounts.
310
- # </dd>
311
- # <dt>enableTwitterSharing:</dt>
312
- # <dd>
313
- # Whether the client application should enable sharing of notes on Twitter.
314
- # </dd>
315
- # </dl>
316
- class BootstrapSettings
317
- include ::Thrift::Struct, ::Thrift::Struct_Union
318
- SERVICEHOST = 1
319
- MARKETINGURL = 2
320
- SUPPORTURL = 3
321
- ACCOUNTEMAILDOMAIN = 4
322
- ENABLEFACEBOOKSHARING = 5
323
- ENABLEGIFTSUBSCRIPTIONS = 6
324
- ENABLESUPPORTTICKETS = 7
325
- ENABLESHAREDNOTEBOOKS = 8
326
- ENABLESINGLENOTESHARING = 9
327
- ENABLESPONSOREDACCOUNTS = 10
328
- ENABLETWITTERSHARING = 11
329
-
330
- FIELDS = {
331
- SERVICEHOST => {:type => ::Thrift::Types::STRING, :name => 'serviceHost'},
332
- MARKETINGURL => {:type => ::Thrift::Types::STRING, :name => 'marketingUrl'},
333
- SUPPORTURL => {:type => ::Thrift::Types::STRING, :name => 'supportUrl'},
334
- ACCOUNTEMAILDOMAIN => {:type => ::Thrift::Types::STRING, :name => 'accountEmailDomain'},
335
- ENABLEFACEBOOKSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableFacebookSharing', :optional => true},
336
- ENABLEGIFTSUBSCRIPTIONS => {:type => ::Thrift::Types::BOOL, :name => 'enableGiftSubscriptions', :optional => true},
337
- ENABLESUPPORTTICKETS => {:type => ::Thrift::Types::BOOL, :name => 'enableSupportTickets', :optional => true},
338
- ENABLESHAREDNOTEBOOKS => {:type => ::Thrift::Types::BOOL, :name => 'enableSharedNotebooks', :optional => true},
339
- ENABLESINGLENOTESHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableSingleNoteSharing', :optional => true},
340
- ENABLESPONSOREDACCOUNTS => {:type => ::Thrift::Types::BOOL, :name => 'enableSponsoredAccounts', :optional => true},
341
- ENABLETWITTERSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableTwitterSharing', :optional => true}
342
- }
343
-
344
- def struct_fields; FIELDS; end
345
-
346
- def validate
347
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field serviceHost is unset!') unless @serviceHost
348
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field marketingUrl is unset!') unless @marketingUrl
349
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field supportUrl is unset!') unless @supportUrl
350
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field accountEmailDomain is unset!') unless @accountEmailDomain
351
- end
352
-
353
- ::Thrift::Struct.generate_accessors self
354
- end
355
-
356
- # This structure describes a collection of bootstrap settings.
357
- # <dl>
358
- # <dt>name:</dt>
359
- # <dd>
360
- # The unique name of the profile, which is guaranteed to remain consistent across
361
- # calls to getBootstrapInfo.
362
- # </dd>
363
- # <dt>settings:</dt>
364
- # <dd>
365
- # The settings for this profile.
366
- # </dd>
367
- # </dl>
368
- class BootstrapProfile
369
- include ::Thrift::Struct, ::Thrift::Struct_Union
370
- NAME = 1
371
- SETTINGS = 2
372
-
373
- FIELDS = {
374
- NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
375
- SETTINGS => {:type => ::Thrift::Types::STRUCT, :name => 'settings', :class => Evernote::EDAM::UserStore::BootstrapSettings}
376
- }
377
-
378
- def struct_fields; FIELDS; end
379
-
380
- def validate
381
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
382
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field settings is unset!') unless @settings
383
- end
384
-
385
- ::Thrift::Struct.generate_accessors self
386
- end
387
-
388
- # This structure describes a collection of bootstrap profiles.
389
- # <dl>
390
- # <dt>profiles:</dt>
391
- # <dd>
392
- # List of one or more bootstrap profiles, in descending
393
- # preference order.
394
- # </dd>
395
- # </dl>
396
- class BootstrapInfo
397
- include ::Thrift::Struct, ::Thrift::Struct_Union
398
- PROFILES = 1
399
-
400
- FIELDS = {
401
- PROFILES => {:type => ::Thrift::Types::LIST, :name => 'profiles', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::UserStore::BootstrapProfile}}
402
- }
403
-
404
- def struct_fields; FIELDS; end
405
-
406
- def validate
407
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field profiles is unset!') unless @profiles
408
- end
409
-
410
- ::Thrift::Struct.generate_accessors self
411
- end
412
-
413
- end
414
- end
415
- end