evernote-thrift 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/Evernote/EDAM/note_store.rb +83 -6
- data/lib/Evernote/EDAM/note_store_types.rb +9 -2
- data/lib/Evernote/EDAM/types_types.rb +66 -4
- data/lib/Evernote/EDAM/user_store.rb +89 -13
- data/lib/Evernote/EDAM/user_store_constants.rb +1 -1
- data/lib/Evernote/EDAM/user_store_types.rb +22 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: feb94d8e754637b7efb9471f6cf38e01d8a2b7b7
|
|
4
|
+
data.tar.gz: 33150db7f660e2f751e99ea868f037a74c236daf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb79928749155fdf34e6cc15747266b37919cfa1e0648cc0afb9a21c5824917b16530204bea2894e1c396d97589f970ff53efd1721fa4a8cc2c051c046160833
|
|
7
|
+
data.tar.gz: 754058300c556abcf8cc828cc572f706b7a9f636f1150ff5f7ffd848e8fa3b817f5d2ec6726ff7bfb8d7e0612f661544eb7ec1f72d7bd267307aefc4ce0c1257
|
data/README.md
CHANGED
|
@@ -1081,6 +1081,24 @@ module Evernote
|
|
|
1081
1081
|
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'updateSharedNotebook failed: unknown result')
|
|
1082
1082
|
end
|
|
1083
1083
|
|
|
1084
|
+
def setSharedNotebookRecipientSettings(authenticationToken, sharedNotebookId, recipientSettings)
|
|
1085
|
+
send_setSharedNotebookRecipientSettings(authenticationToken, sharedNotebookId, recipientSettings)
|
|
1086
|
+
return recv_setSharedNotebookRecipientSettings()
|
|
1087
|
+
end
|
|
1088
|
+
|
|
1089
|
+
def send_setSharedNotebookRecipientSettings(authenticationToken, sharedNotebookId, recipientSettings)
|
|
1090
|
+
send_message('setSharedNotebookRecipientSettings', SetSharedNotebookRecipientSettings_args, :authenticationToken => authenticationToken, :sharedNotebookId => sharedNotebookId, :recipientSettings => recipientSettings)
|
|
1091
|
+
end
|
|
1092
|
+
|
|
1093
|
+
def recv_setSharedNotebookRecipientSettings()
|
|
1094
|
+
result = receive_message(SetSharedNotebookRecipientSettings_result)
|
|
1095
|
+
return result.success unless result.success.nil?
|
|
1096
|
+
raise result.userException unless result.userException.nil?
|
|
1097
|
+
raise result.notFoundException unless result.notFoundException.nil?
|
|
1098
|
+
raise result.systemException unless result.systemException.nil?
|
|
1099
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'setSharedNotebookRecipientSettings failed: unknown result')
|
|
1100
|
+
end
|
|
1101
|
+
|
|
1084
1102
|
def sendMessageToSharedNotebookMembers(authenticationToken, notebookGuid, messageText, recipients)
|
|
1085
1103
|
send_sendMessageToSharedNotebookMembers(authenticationToken, notebookGuid, messageText, recipients)
|
|
1086
1104
|
return recv_sendMessageToSharedNotebookMembers()
|
|
@@ -1295,13 +1313,13 @@ module Evernote
|
|
|
1295
1313
|
return
|
|
1296
1314
|
end
|
|
1297
1315
|
|
|
1298
|
-
def authenticateToSharedNote(guid, noteKey)
|
|
1299
|
-
send_authenticateToSharedNote(guid, noteKey)
|
|
1316
|
+
def authenticateToSharedNote(guid, noteKey, authenticationToken)
|
|
1317
|
+
send_authenticateToSharedNote(guid, noteKey, authenticationToken)
|
|
1300
1318
|
return recv_authenticateToSharedNote()
|
|
1301
1319
|
end
|
|
1302
1320
|
|
|
1303
|
-
def send_authenticateToSharedNote(guid, noteKey)
|
|
1304
|
-
send_message('authenticateToSharedNote', AuthenticateToSharedNote_args, :guid => guid, :noteKey => noteKey)
|
|
1321
|
+
def send_authenticateToSharedNote(guid, noteKey, authenticationToken)
|
|
1322
|
+
send_message('authenticateToSharedNote', AuthenticateToSharedNote_args, :guid => guid, :noteKey => noteKey, :authenticationToken => authenticationToken)
|
|
1305
1323
|
end
|
|
1306
1324
|
|
|
1307
1325
|
def recv_authenticateToSharedNote()
|
|
@@ -2212,6 +2230,21 @@ module Evernote
|
|
|
2212
2230
|
write_result(result, oprot, 'updateSharedNotebook', seqid)
|
|
2213
2231
|
end
|
|
2214
2232
|
|
|
2233
|
+
def process_setSharedNotebookRecipientSettings(seqid, iprot, oprot)
|
|
2234
|
+
args = read_args(iprot, SetSharedNotebookRecipientSettings_args)
|
|
2235
|
+
result = SetSharedNotebookRecipientSettings_result.new()
|
|
2236
|
+
begin
|
|
2237
|
+
result.success = @handler.setSharedNotebookRecipientSettings(args.authenticationToken, args.sharedNotebookId, args.recipientSettings)
|
|
2238
|
+
rescue ::Evernote::EDAM::Error::EDAMUserException => userException
|
|
2239
|
+
result.userException = userException
|
|
2240
|
+
rescue ::Evernote::EDAM::Error::EDAMNotFoundException => notFoundException
|
|
2241
|
+
result.notFoundException = notFoundException
|
|
2242
|
+
rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
|
|
2243
|
+
result.systemException = systemException
|
|
2244
|
+
end
|
|
2245
|
+
write_result(result, oprot, 'setSharedNotebookRecipientSettings', seqid)
|
|
2246
|
+
end
|
|
2247
|
+
|
|
2215
2248
|
def process_sendMessageToSharedNotebookMembers(seqid, iprot, oprot)
|
|
2216
2249
|
args = read_args(iprot, SendMessageToSharedNotebookMembers_args)
|
|
2217
2250
|
result = SendMessageToSharedNotebookMembers_result.new()
|
|
@@ -2396,7 +2429,7 @@ module Evernote
|
|
|
2396
2429
|
args = read_args(iprot, AuthenticateToSharedNote_args)
|
|
2397
2430
|
result = AuthenticateToSharedNote_result.new()
|
|
2398
2431
|
begin
|
|
2399
|
-
result.success = @handler.authenticateToSharedNote(args.guid, args.noteKey)
|
|
2432
|
+
result.success = @handler.authenticateToSharedNote(args.guid, args.noteKey, args.authenticationToken)
|
|
2400
2433
|
rescue ::Evernote::EDAM::Error::EDAMUserException => userException
|
|
2401
2434
|
result.userException = userException
|
|
2402
2435
|
rescue ::Evernote::EDAM::Error::EDAMNotFoundException => notFoundException
|
|
@@ -4870,6 +4903,48 @@ module Evernote
|
|
|
4870
4903
|
::Thrift::Struct.generate_accessors self
|
|
4871
4904
|
end
|
|
4872
4905
|
|
|
4906
|
+
class SetSharedNotebookRecipientSettings_args
|
|
4907
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
4908
|
+
AUTHENTICATIONTOKEN = 1
|
|
4909
|
+
SHAREDNOTEBOOKID = 2
|
|
4910
|
+
RECIPIENTSETTINGS = 3
|
|
4911
|
+
|
|
4912
|
+
FIELDS = {
|
|
4913
|
+
AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'},
|
|
4914
|
+
SHAREDNOTEBOOKID => {:type => ::Thrift::Types::I64, :name => 'sharedNotebookId'},
|
|
4915
|
+
RECIPIENTSETTINGS => {:type => ::Thrift::Types::STRUCT, :name => 'recipientSettings', :class => ::Evernote::EDAM::Type::SharedNotebookRecipientSettings}
|
|
4916
|
+
}
|
|
4917
|
+
|
|
4918
|
+
def struct_fields; FIELDS; end
|
|
4919
|
+
|
|
4920
|
+
def validate
|
|
4921
|
+
end
|
|
4922
|
+
|
|
4923
|
+
::Thrift::Struct.generate_accessors self
|
|
4924
|
+
end
|
|
4925
|
+
|
|
4926
|
+
class SetSharedNotebookRecipientSettings_result
|
|
4927
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
4928
|
+
SUCCESS = 0
|
|
4929
|
+
USEREXCEPTION = 1
|
|
4930
|
+
NOTFOUNDEXCEPTION = 2
|
|
4931
|
+
SYSTEMEXCEPTION = 3
|
|
4932
|
+
|
|
4933
|
+
FIELDS = {
|
|
4934
|
+
SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
|
|
4935
|
+
USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
|
|
4936
|
+
NOTFOUNDEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'notFoundException', :class => ::Evernote::EDAM::Error::EDAMNotFoundException},
|
|
4937
|
+
SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
|
|
4938
|
+
}
|
|
4939
|
+
|
|
4940
|
+
def struct_fields; FIELDS; end
|
|
4941
|
+
|
|
4942
|
+
def validate
|
|
4943
|
+
end
|
|
4944
|
+
|
|
4945
|
+
::Thrift::Struct.generate_accessors self
|
|
4946
|
+
end
|
|
4947
|
+
|
|
4873
4948
|
class SendMessageToSharedNotebookMembers_args
|
|
4874
4949
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
4875
4950
|
AUTHENTICATIONTOKEN = 1
|
|
@@ -5348,10 +5423,12 @@ module Evernote
|
|
|
5348
5423
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
5349
5424
|
GUID = 1
|
|
5350
5425
|
NOTEKEY = 2
|
|
5426
|
+
AUTHENTICATIONTOKEN = 3
|
|
5351
5427
|
|
|
5352
5428
|
FIELDS = {
|
|
5353
5429
|
GUID => {:type => ::Thrift::Types::STRING, :name => 'guid'},
|
|
5354
|
-
NOTEKEY => {:type => ::Thrift::Types::STRING, :name => 'noteKey'}
|
|
5430
|
+
NOTEKEY => {:type => ::Thrift::Types::STRING, :name => 'noteKey'},
|
|
5431
|
+
AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
|
|
5355
5432
|
}
|
|
5356
5433
|
|
|
5357
5434
|
def struct_fields; FIELDS; end
|
|
@@ -926,7 +926,7 @@ module Evernote
|
|
|
926
926
|
# entities.
|
|
927
927
|
#
|
|
928
928
|
# You must specify either <em>noteGuid</em> or <em>plainText</em>, but
|
|
929
|
-
# not both. <em>filter</em>
|
|
929
|
+
# not both. <em>filter</em> and <em>referenceUri</em> are optional.
|
|
930
930
|
#
|
|
931
931
|
# <dl>
|
|
932
932
|
# <dt>noteGuid</dt>
|
|
@@ -945,17 +945,24 @@ module Evernote
|
|
|
945
945
|
# Please note that some of the parameters may be ignored, such as
|
|
946
946
|
# <em>order</em> and <em>ascending</em>.
|
|
947
947
|
# </dd>
|
|
948
|
+
#
|
|
949
|
+
# <dt>referenceUri</dt>
|
|
950
|
+
# <dd>A URI string specifying a reference entity, around which "relatedness"
|
|
951
|
+
# should be based. This can be an URL pointing to a web page, for example.
|
|
952
|
+
# </dd>
|
|
948
953
|
# </dl>
|
|
949
954
|
class RelatedQuery
|
|
950
955
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
951
956
|
NOTEGUID = 1
|
|
952
957
|
PLAINTEXT = 2
|
|
953
958
|
FILTER = 3
|
|
959
|
+
REFERENCEURI = 4
|
|
954
960
|
|
|
955
961
|
FIELDS = {
|
|
956
962
|
NOTEGUID => {:type => ::Thrift::Types::STRING, :name => 'noteGuid', :optional => true},
|
|
957
963
|
PLAINTEXT => {:type => ::Thrift::Types::STRING, :name => 'plainText', :optional => true},
|
|
958
|
-
FILTER => {:type => ::Thrift::Types::STRUCT, :name => 'filter', :class => ::Evernote::EDAM::NoteStore::NoteFilter, :optional => true}
|
|
964
|
+
FILTER => {:type => ::Thrift::Types::STRUCT, :name => 'filter', :class => ::Evernote::EDAM::NoteStore::NoteFilter, :optional => true},
|
|
965
|
+
REFERENCEURI => {:type => ::Thrift::Types::STRING, :name => 'referenceUri', :optional => true}
|
|
959
966
|
}
|
|
960
967
|
|
|
961
968
|
def struct_fields; FIELDS; end
|
|
@@ -1292,8 +1292,8 @@ module Evernote
|
|
|
1292
1292
|
# the client MUST treat the note as read-only. In this case, the
|
|
1293
1293
|
# client MAY modify the note's notebook and tags via the
|
|
1294
1294
|
# Note.notebookGuid and Note.tagGuids fields. The client MAY also
|
|
1295
|
-
# modify the
|
|
1296
|
-
#
|
|
1295
|
+
# modify the reminderOrder field as well as the reminderTime and
|
|
1296
|
+
# reminderDoneTime fields.
|
|
1297
1297
|
# <p>Applications should set contentClass only when they are creating notes
|
|
1298
1298
|
# that contain structured information that needs to be maintained in order
|
|
1299
1299
|
# for the user to be able to use the note within that application.
|
|
@@ -1323,6 +1323,9 @@ module Evernote
|
|
|
1323
1323
|
# Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX
|
|
1324
1324
|
# </dd>
|
|
1325
1325
|
#
|
|
1326
|
+
# <dt>creatorId</dt>
|
|
1327
|
+
# <dd>The numeric user ID of the user who originally created the note.</dd>
|
|
1328
|
+
#
|
|
1326
1329
|
# <dt>lastEditedBy</dt>
|
|
1327
1330
|
# <dd>An indication of who made the last change to the note. If you are
|
|
1328
1331
|
# accessing the note via a shared notebook to which you have modification
|
|
@@ -1334,6 +1337,9 @@ module Evernote
|
|
|
1334
1337
|
# it will be left unset. This field is read-only by clients. The server
|
|
1335
1338
|
# will ignore all values set by clients into this field.</dd>
|
|
1336
1339
|
#
|
|
1340
|
+
# <dt>lastEditorId</dt>
|
|
1341
|
+
# <dd>The numeric user ID of the user described in lastEditedBy.</dd>
|
|
1342
|
+
#
|
|
1337
1343
|
# <dt>classifications</dt>
|
|
1338
1344
|
# <dd>A map of classifications applied to the note by clients or by the
|
|
1339
1345
|
# Evernote service. The key is the string name of the classification type,
|
|
@@ -1359,6 +1365,8 @@ module Evernote
|
|
|
1359
1365
|
APPLICATIONDATA = 23
|
|
1360
1366
|
LASTEDITEDBY = 24
|
|
1361
1367
|
CLASSIFICATIONS = 26
|
|
1368
|
+
CREATORID = 27
|
|
1369
|
+
LASTEDITORID = 28
|
|
1362
1370
|
|
|
1363
1371
|
FIELDS = {
|
|
1364
1372
|
SUBJECTDATE => {:type => ::Thrift::Types::I64, :name => 'subjectDate', :optional => true},
|
|
@@ -1377,7 +1385,9 @@ module Evernote
|
|
|
1377
1385
|
CONTENTCLASS => {:type => ::Thrift::Types::STRING, :name => 'contentClass', :optional => true},
|
|
1378
1386
|
APPLICATIONDATA => {:type => ::Thrift::Types::STRUCT, :name => 'applicationData', :class => ::Evernote::EDAM::Type::LazyMap, :optional => true},
|
|
1379
1387
|
LASTEDITEDBY => {:type => ::Thrift::Types::STRING, :name => 'lastEditedBy', :optional => true},
|
|
1380
|
-
CLASSIFICATIONS => {:type => ::Thrift::Types::MAP, :name => 'classifications', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
|
|
1388
|
+
CLASSIFICATIONS => {:type => ::Thrift::Types::MAP, :name => 'classifications', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
|
|
1389
|
+
CREATORID => {:type => ::Thrift::Types::I32, :name => 'creatorId', :optional => true},
|
|
1390
|
+
LASTEDITORID => {:type => ::Thrift::Types::I32, :name => 'lastEditorId', :optional => true}
|
|
1381
1391
|
}
|
|
1382
1392
|
|
|
1383
1393
|
def struct_fields; FIELDS; end
|
|
@@ -1790,6 +1800,50 @@ module Evernote
|
|
|
1790
1800
|
::Thrift::Struct.generate_accessors self
|
|
1791
1801
|
end
|
|
1792
1802
|
|
|
1803
|
+
# Settings meant for the recipient of a shared notebook, such as
|
|
1804
|
+
# for indicating which types of notifications the recipient wishes
|
|
1805
|
+
# for reminders, etc.
|
|
1806
|
+
#
|
|
1807
|
+
# The reminderNotifyEmail and reminderNotifyInApp fields have a
|
|
1808
|
+
# 3-state read value but a 2-state write value. On read, it is
|
|
1809
|
+
# possible to observe "unset", true, or false. The initial state is
|
|
1810
|
+
# "unset". When you choose to set a value, you may set it to either
|
|
1811
|
+
# true or false, but you cannot unset the value. Once one of these
|
|
1812
|
+
# members has a true/false value, it will always have a true/false
|
|
1813
|
+
# value.
|
|
1814
|
+
#
|
|
1815
|
+
# <dl>
|
|
1816
|
+
# <dt>reminderNotifyEmail</dt>
|
|
1817
|
+
# <dd>Indicates that the user wishes to receive daily e-mail notifications
|
|
1818
|
+
# for reminders associated with the shared notebook. This may be
|
|
1819
|
+
# true only for business notebooks that belong to the business of
|
|
1820
|
+
# which the user is a member. You may only set this value on a
|
|
1821
|
+
# notebook in your business.</dd>
|
|
1822
|
+
# <dt>reminderNotifyInApp</dt>
|
|
1823
|
+
# <dd>Indicates that the user wishes to receive notifications for
|
|
1824
|
+
# reminders by applications that support providing such
|
|
1825
|
+
# notifications. The exact nature of the notification is defined
|
|
1826
|
+
# by the individual applications.</dd>
|
|
1827
|
+
# </dl>
|
|
1828
|
+
#
|
|
1829
|
+
class SharedNotebookRecipientSettings
|
|
1830
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
1831
|
+
REMINDERNOTIFYEMAIL = 1
|
|
1832
|
+
REMINDERNOTIFYINAPP = 2
|
|
1833
|
+
|
|
1834
|
+
FIELDS = {
|
|
1835
|
+
REMINDERNOTIFYEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'reminderNotifyEmail', :optional => true},
|
|
1836
|
+
REMINDERNOTIFYINAPP => {:type => ::Thrift::Types::BOOL, :name => 'reminderNotifyInApp', :optional => true}
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
def struct_fields; FIELDS; end
|
|
1840
|
+
|
|
1841
|
+
def validate
|
|
1842
|
+
end
|
|
1843
|
+
|
|
1844
|
+
::Thrift::Struct.generate_accessors self
|
|
1845
|
+
end
|
|
1846
|
+
|
|
1793
1847
|
# Shared notebooks represent a relationship between a notebook and a single
|
|
1794
1848
|
# share invitation recipient.
|
|
1795
1849
|
# <dl>
|
|
@@ -1843,6 +1897,12 @@ module Evernote
|
|
|
1843
1897
|
# an authorization token. This setting expires after the first use
|
|
1844
1898
|
# of authenticateToSharedNotebook(...) with a valid authentication
|
|
1845
1899
|
# token.</dd>
|
|
1900
|
+
#
|
|
1901
|
+
# <dt>recipientSettings</dt>
|
|
1902
|
+
# <dd>Settings intended for use only by the recipient of this shared
|
|
1903
|
+
# notebook. You should skip setting this value unless you want
|
|
1904
|
+
# to change the value contained inside the structure, and only if
|
|
1905
|
+
# you are the recipient.</dd>
|
|
1846
1906
|
# </dl>
|
|
1847
1907
|
class SharedNotebook
|
|
1848
1908
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
@@ -1858,6 +1918,7 @@ module Evernote
|
|
|
1858
1918
|
USERNAME = 9
|
|
1859
1919
|
PRIVILEGE = 11
|
|
1860
1920
|
ALLOWPREVIEW = 12
|
|
1921
|
+
RECIPIENTSETTINGS = 13
|
|
1861
1922
|
|
|
1862
1923
|
FIELDS = {
|
|
1863
1924
|
ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
|
|
@@ -1871,7 +1932,8 @@ module Evernote
|
|
|
1871
1932
|
SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
|
|
1872
1933
|
USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
|
|
1873
1934
|
PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookPrivilegeLevel},
|
|
1874
|
-
ALLOWPREVIEW => {:type => ::Thrift::Types::BOOL, :name => 'allowPreview', :optional => true}
|
|
1935
|
+
ALLOWPREVIEW => {:type => ::Thrift::Types::BOOL, :name => 'allowPreview', :optional => true},
|
|
1936
|
+
RECIPIENTSETTINGS => {:type => ::Thrift::Types::STRUCT, :name => 'recipientSettings', :class => ::Evernote::EDAM::Type::SharedNotebookRecipientSettings, :optional => true}
|
|
1875
1937
|
}
|
|
1876
1938
|
|
|
1877
1939
|
def struct_fields; FIELDS; end
|
|
@@ -44,13 +44,13 @@ module Evernote
|
|
|
44
44
|
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getBootstrapInfo failed: unknown result')
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
def authenticate(username, password, consumerKey, consumerSecret)
|
|
48
|
-
send_authenticate(username, password, consumerKey, consumerSecret)
|
|
47
|
+
def authenticate(username, password, consumerKey, consumerSecret, supportsTwoFactor)
|
|
48
|
+
send_authenticate(username, password, consumerKey, consumerSecret, supportsTwoFactor)
|
|
49
49
|
return recv_authenticate()
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
def send_authenticate(username, password, consumerKey, consumerSecret)
|
|
53
|
-
send_message('authenticate', Authenticate_args, :username => username, :password => password, :consumerKey => consumerKey, :consumerSecret => consumerSecret)
|
|
52
|
+
def send_authenticate(username, password, consumerKey, consumerSecret, supportsTwoFactor)
|
|
53
|
+
send_message('authenticate', Authenticate_args, :username => username, :password => password, :consumerKey => consumerKey, :consumerSecret => consumerSecret, :supportsTwoFactor => supportsTwoFactor)
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def recv_authenticate()
|
|
@@ -61,13 +61,13 @@ module Evernote
|
|
|
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)
|
|
64
|
+
def authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor)
|
|
65
|
+
send_authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor)
|
|
66
66
|
return recv_authenticateLongSession()
|
|
67
67
|
end
|
|
68
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)
|
|
69
|
+
def send_authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor)
|
|
70
|
+
send_message('authenticateLongSession', AuthenticateLongSession_args, :username => username, :password => password, :consumerKey => consumerKey, :consumerSecret => consumerSecret, :deviceIdentifier => deviceIdentifier, :deviceDescription => deviceDescription, :supportsTwoFactor => supportsTwoFactor)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
def recv_authenticateLongSession()
|
|
@@ -78,6 +78,23 @@ module Evernote
|
|
|
78
78
|
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticateLongSession failed: unknown result')
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
def completeTwoFactorAuthentication(authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription)
|
|
82
|
+
send_completeTwoFactorAuthentication(authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription)
|
|
83
|
+
return recv_completeTwoFactorAuthentication()
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def send_completeTwoFactorAuthentication(authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription)
|
|
87
|
+
send_message('completeTwoFactorAuthentication', CompleteTwoFactorAuthentication_args, :authenticationToken => authenticationToken, :oneTimeCode => oneTimeCode, :deviceIdentifier => deviceIdentifier, :deviceDescription => deviceDescription)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def recv_completeTwoFactorAuthentication()
|
|
91
|
+
result = receive_message(CompleteTwoFactorAuthentication_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, 'completeTwoFactorAuthentication failed: unknown result')
|
|
96
|
+
end
|
|
97
|
+
|
|
81
98
|
def revokeLongSession(authenticationToken)
|
|
82
99
|
send_revokeLongSession(authenticationToken)
|
|
83
100
|
recv_revokeLongSession()
|
|
@@ -220,7 +237,7 @@ module Evernote
|
|
|
220
237
|
args = read_args(iprot, Authenticate_args)
|
|
221
238
|
result = Authenticate_result.new()
|
|
222
239
|
begin
|
|
223
|
-
result.success = @handler.authenticate(args.username, args.password, args.consumerKey, args.consumerSecret)
|
|
240
|
+
result.success = @handler.authenticate(args.username, args.password, args.consumerKey, args.consumerSecret, args.supportsTwoFactor)
|
|
224
241
|
rescue ::Evernote::EDAM::Error::EDAMUserException => userException
|
|
225
242
|
result.userException = userException
|
|
226
243
|
rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
|
|
@@ -233,7 +250,7 @@ module Evernote
|
|
|
233
250
|
args = read_args(iprot, AuthenticateLongSession_args)
|
|
234
251
|
result = AuthenticateLongSession_result.new()
|
|
235
252
|
begin
|
|
236
|
-
result.success = @handler.authenticateLongSession(args.username, args.password, args.consumerKey, args.consumerSecret, args.deviceIdentifier, args.deviceDescription)
|
|
253
|
+
result.success = @handler.authenticateLongSession(args.username, args.password, args.consumerKey, args.consumerSecret, args.deviceIdentifier, args.deviceDescription, args.supportsTwoFactor)
|
|
237
254
|
rescue ::Evernote::EDAM::Error::EDAMUserException => userException
|
|
238
255
|
result.userException = userException
|
|
239
256
|
rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
|
|
@@ -242,6 +259,19 @@ module Evernote
|
|
|
242
259
|
write_result(result, oprot, 'authenticateLongSession', seqid)
|
|
243
260
|
end
|
|
244
261
|
|
|
262
|
+
def process_completeTwoFactorAuthentication(seqid, iprot, oprot)
|
|
263
|
+
args = read_args(iprot, CompleteTwoFactorAuthentication_args)
|
|
264
|
+
result = CompleteTwoFactorAuthentication_result.new()
|
|
265
|
+
begin
|
|
266
|
+
result.success = @handler.completeTwoFactorAuthentication(args.authenticationToken, args.oneTimeCode, args.deviceIdentifier, args.deviceDescription)
|
|
267
|
+
rescue ::Evernote::EDAM::Error::EDAMUserException => userException
|
|
268
|
+
result.userException = userException
|
|
269
|
+
rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
|
|
270
|
+
result.systemException = systemException
|
|
271
|
+
end
|
|
272
|
+
write_result(result, oprot, 'completeTwoFactorAuthentication', seqid)
|
|
273
|
+
end
|
|
274
|
+
|
|
245
275
|
def process_revokeLongSession(seqid, iprot, oprot)
|
|
246
276
|
args = read_args(iprot, RevokeLongSession_args)
|
|
247
277
|
result = RevokeLongSession_result.new()
|
|
@@ -348,7 +378,7 @@ module Evernote
|
|
|
348
378
|
FIELDS = {
|
|
349
379
|
CLIENTNAME => {:type => ::Thrift::Types::STRING, :name => 'clientName'},
|
|
350
380
|
EDAMVERSIONMAJOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMajor', :default => 1},
|
|
351
|
-
EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default =>
|
|
381
|
+
EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 25}
|
|
352
382
|
}
|
|
353
383
|
|
|
354
384
|
def struct_fields; FIELDS; end
|
|
@@ -413,12 +443,14 @@ module Evernote
|
|
|
413
443
|
PASSWORD = 2
|
|
414
444
|
CONSUMERKEY = 3
|
|
415
445
|
CONSUMERSECRET = 4
|
|
446
|
+
SUPPORTSTWOFACTOR = 5
|
|
416
447
|
|
|
417
448
|
FIELDS = {
|
|
418
449
|
USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
|
|
419
450
|
PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
|
|
420
451
|
CONSUMERKEY => {:type => ::Thrift::Types::STRING, :name => 'consumerKey'},
|
|
421
|
-
CONSUMERSECRET => {:type => ::Thrift::Types::STRING, :name => 'consumerSecret'}
|
|
452
|
+
CONSUMERSECRET => {:type => ::Thrift::Types::STRING, :name => 'consumerSecret'},
|
|
453
|
+
SUPPORTSTWOFACTOR => {:type => ::Thrift::Types::BOOL, :name => 'supportsTwoFactor'}
|
|
422
454
|
}
|
|
423
455
|
|
|
424
456
|
def struct_fields; FIELDS; end
|
|
@@ -457,6 +489,7 @@ module Evernote
|
|
|
457
489
|
CONSUMERSECRET = 4
|
|
458
490
|
DEVICEIDENTIFIER = 5
|
|
459
491
|
DEVICEDESCRIPTION = 6
|
|
492
|
+
SUPPORTSTWOFACTOR = 7
|
|
460
493
|
|
|
461
494
|
FIELDS = {
|
|
462
495
|
USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
|
|
@@ -464,7 +497,8 @@ module Evernote
|
|
|
464
497
|
CONSUMERKEY => {:type => ::Thrift::Types::STRING, :name => 'consumerKey'},
|
|
465
498
|
CONSUMERSECRET => {:type => ::Thrift::Types::STRING, :name => 'consumerSecret'},
|
|
466
499
|
DEVICEIDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'deviceIdentifier'},
|
|
467
|
-
DEVICEDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'deviceDescription'}
|
|
500
|
+
DEVICEDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'deviceDescription'},
|
|
501
|
+
SUPPORTSTWOFACTOR => {:type => ::Thrift::Types::BOOL, :name => 'supportsTwoFactor'}
|
|
468
502
|
}
|
|
469
503
|
|
|
470
504
|
def struct_fields; FIELDS; end
|
|
@@ -495,6 +529,48 @@ module Evernote
|
|
|
495
529
|
::Thrift::Struct.generate_accessors self
|
|
496
530
|
end
|
|
497
531
|
|
|
532
|
+
class CompleteTwoFactorAuthentication_args
|
|
533
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
534
|
+
AUTHENTICATIONTOKEN = 1
|
|
535
|
+
ONETIMECODE = 2
|
|
536
|
+
DEVICEIDENTIFIER = 3
|
|
537
|
+
DEVICEDESCRIPTION = 4
|
|
538
|
+
|
|
539
|
+
FIELDS = {
|
|
540
|
+
AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'},
|
|
541
|
+
ONETIMECODE => {:type => ::Thrift::Types::STRING, :name => 'oneTimeCode'},
|
|
542
|
+
DEVICEIDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'deviceIdentifier'},
|
|
543
|
+
DEVICEDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'deviceDescription'}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
def struct_fields; FIELDS; end
|
|
547
|
+
|
|
548
|
+
def validate
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
::Thrift::Struct.generate_accessors self
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
class CompleteTwoFactorAuthentication_result
|
|
555
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
556
|
+
SUCCESS = 0
|
|
557
|
+
USEREXCEPTION = 1
|
|
558
|
+
SYSTEMEXCEPTION = 2
|
|
559
|
+
|
|
560
|
+
FIELDS = {
|
|
561
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::UserStore::AuthenticationResult},
|
|
562
|
+
USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
|
|
563
|
+
SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
def struct_fields; FIELDS; end
|
|
567
|
+
|
|
568
|
+
def validate
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
::Thrift::Struct.generate_accessors self
|
|
572
|
+
end
|
|
573
|
+
|
|
498
574
|
class RevokeLongSession_args
|
|
499
575
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
500
576
|
AUTHENTICATIONTOKEN = 1
|
|
@@ -126,6 +126,23 @@ module Evernote
|
|
|
126
126
|
# end of this string to construct the full URL, as documented on our
|
|
127
127
|
# developer web site.
|
|
128
128
|
# </dd>
|
|
129
|
+
# <dt>secondFactorRequired:</dt>
|
|
130
|
+
# <dd>
|
|
131
|
+
# If set to true, this field indicates that the user has enabled two-factor
|
|
132
|
+
# authentication and must enter their second factor in order to complete
|
|
133
|
+
# authentication. In this case the value of authenticationResult will be
|
|
134
|
+
# a short-lived authentication token that may only be used to make a
|
|
135
|
+
# subsequent call to completeTwoFactorAuthentication.
|
|
136
|
+
# </dd>
|
|
137
|
+
# <dt>secondFactorDeliveryHint:</dt>
|
|
138
|
+
# <dd>
|
|
139
|
+
# When secondFactorRequired is set to true, this field may contain a string
|
|
140
|
+
# describing the second factor delivery method that the user has configured.
|
|
141
|
+
# This will typically be an obfuscated mobile device number, such as
|
|
142
|
+
# "(xxx) xxx-x095". This string can be displayed to the user to remind them
|
|
143
|
+
# how to obtain the required second factor.
|
|
144
|
+
# TODO do we need to differentiate between SMS and voice delivery?
|
|
145
|
+
# </dd>
|
|
129
146
|
# </dl>
|
|
130
147
|
class AuthenticationResult
|
|
131
148
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
@@ -136,6 +153,8 @@ module Evernote
|
|
|
136
153
|
PUBLICUSERINFO = 5
|
|
137
154
|
NOTESTOREURL = 6
|
|
138
155
|
WEBAPIURLPREFIX = 7
|
|
156
|
+
SECONDFACTORREQUIRED = 8
|
|
157
|
+
SECONDFACTORDELIVERYHINT = 9
|
|
139
158
|
|
|
140
159
|
FIELDS = {
|
|
141
160
|
CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
|
|
@@ -144,7 +163,9 @@ module Evernote
|
|
|
144
163
|
USER => {:type => ::Thrift::Types::STRUCT, :name => 'user', :class => ::Evernote::EDAM::Type::User, :optional => true},
|
|
145
164
|
PUBLICUSERINFO => {:type => ::Thrift::Types::STRUCT, :name => 'publicUserInfo', :class => ::Evernote::EDAM::UserStore::PublicUserInfo, :optional => true},
|
|
146
165
|
NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true},
|
|
147
|
-
WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true}
|
|
166
|
+
WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true},
|
|
167
|
+
SECONDFACTORREQUIRED => {:type => ::Thrift::Types::BOOL, :name => 'secondFactorRequired', :optional => true},
|
|
168
|
+
SECONDFACTORDELIVERYHINT => {:type => ::Thrift::Types::STRING, :name => 'secondFactorDeliveryHint', :optional => true}
|
|
148
169
|
}
|
|
149
170
|
|
|
150
171
|
def struct_fields; FIELDS; end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: evernote-thrift
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.25.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Evernote
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|