evernote 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.mkd CHANGED
@@ -2,7 +2,7 @@
2
2
  This gem is a high level wrapper around Evernote's Thrift-generated ruby code. It bundles up Evernote's thrift-generated code and creates some simple wrapper classes.
3
3
 
4
4
  # setup #
5
- Get yourself a "Client application" API key from Evernote (http://www.evernote.com/about/developer/api/#key), which gives you a "consumer_key" and "consumer_secret" (note that a "web application" API key uses OAuth to authenticate and will not work). Put the key in a YML file or any other place you put configuration information. Also, get yourself a username and password on both their sandbox system (http://sandbox.evernote.com) and live system. You will be using sandbox for testing.
5
+ Get a "Client application" API key from Evernote (http://www.evernote.com/about/developer/api/#key), which gives you a "consumer_key" and "consumer_secret" (note that a "web application" API key uses OAuth to authenticate and will not work). Put the key in a YML file or any other place you put configuration information. Also, get yourself a username and password on both their sandbox system (http://sandbox.evernote.com) and live system. You will be using sandbox for testing.
6
6
 
7
7
  # usage #
8
8
  This script is also located in /example.rb
@@ -40,6 +40,9 @@ The evernote API can be viewed at http://www.evernote.com/about/developer/api/re
40
40
 
41
41
  If the vendored code is out of date and you get an error indicating so, feel free to create an issue at http://github.com/cgs/evernote/issues
42
42
 
43
+ # TODO #
44
+ * OAuth support - will gladly accept a patch for this!
45
+
43
46
  # contributors #
44
47
  Thanks to the following peeps for helping out:
45
48
 
@@ -48,6 +51,7 @@ Thanks to the following peeps for helping out:
48
51
  * Mikhail Zelenin (MioGreen)
49
52
  * Jimmy Zimmerman (jimmyz)
50
53
  * Buck Doyle (backspace)
54
+ * Philippe Creux (pcreux)
51
55
 
52
56
  ## Copyright ##
53
57
  Copyright (c) 2011 Chris Sepic. See LICENSE for details.
@@ -1,3 +1,3 @@
1
1
  module Evernote
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -21,8 +21,13 @@ module Evernote
21
21
  DATA_CONFLICT = 10
22
22
  ENML_VALIDATION = 11
23
23
  SHARD_UNAVAILABLE = 12
24
- VALUE_MAP = {1 => "UNKNOWN", 2 => "BAD_DATA_FORMAT", 3 => "PERMISSION_DENIED", 4 => "INTERNAL_ERROR", 5 => "DATA_REQUIRED", 6 => "LIMIT_REACHED", 7 => "QUOTA_REACHED", 8 => "INVALID_AUTH", 9 => "AUTH_EXPIRED", 10 => "DATA_CONFLICT", 11 => "ENML_VALIDATION", 12 => "SHARD_UNAVAILABLE"}
25
- VALID_VALUES = Set.new([UNKNOWN, BAD_DATA_FORMAT, PERMISSION_DENIED, INTERNAL_ERROR, DATA_REQUIRED, LIMIT_REACHED, QUOTA_REACHED, INVALID_AUTH, AUTH_EXPIRED, DATA_CONFLICT, ENML_VALIDATION, SHARD_UNAVAILABLE]).freeze
24
+ LEN_TOO_SHORT = 13
25
+ LEN_TOO_LONG = 14
26
+ TOO_FEW = 15
27
+ TOO_MANY = 16
28
+ UNSUPPORTED_OPERATION = 17
29
+ VALUE_MAP = {1 => "UNKNOWN", 2 => "BAD_DATA_FORMAT", 3 => "PERMISSION_DENIED", 4 => "INTERNAL_ERROR", 5 => "DATA_REQUIRED", 6 => "LIMIT_REACHED", 7 => "QUOTA_REACHED", 8 => "INVALID_AUTH", 9 => "AUTH_EXPIRED", 10 => "DATA_CONFLICT", 11 => "ENML_VALIDATION", 12 => "SHARD_UNAVAILABLE", 13 => "LEN_TOO_SHORT", 14 => "LEN_TOO_LONG", 15 => "TOO_FEW", 16 => "TOO_MANY", 17 => "UNSUPPORTED_OPERATION"}
30
+ VALID_VALUES = Set.new([UNKNOWN, BAD_DATA_FORMAT, PERMISSION_DENIED, INTERNAL_ERROR, DATA_REQUIRED, LIMIT_REACHED, QUOTA_REACHED, INVALID_AUTH, AUTH_EXPIRED, DATA_CONFLICT, ENML_VALIDATION, SHARD_UNAVAILABLE, LEN_TOO_SHORT, LEN_TOO_LONG, TOO_FEW, TOO_MANY, UNSUPPORTED_OPERATION]).freeze
26
31
  end
27
32
 
28
33
  # This exception is thrown by EDAM procedures when a call fails as a result of
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -31,6 +31,23 @@ require 'note_store_types'
31
31
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSyncState failed: unknown result')
32
32
  end
33
33
 
34
+ def getSyncStateWithMetrics(authenticationToken, clientMetrics)
35
+ send_getSyncStateWithMetrics(authenticationToken, clientMetrics)
36
+ return recv_getSyncStateWithMetrics()
37
+ end
38
+
39
+ def send_getSyncStateWithMetrics(authenticationToken, clientMetrics)
40
+ send_message('getSyncStateWithMetrics', GetSyncStateWithMetrics_args, :authenticationToken => authenticationToken, :clientMetrics => clientMetrics)
41
+ end
42
+
43
+ def recv_getSyncStateWithMetrics()
44
+ result = receive_message(GetSyncStateWithMetrics_result)
45
+ return result.success unless result.success.nil?
46
+ raise result.userException unless result.userException.nil?
47
+ raise result.systemException unless result.systemException.nil?
48
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSyncStateWithMetrics failed: unknown result')
49
+ end
50
+
34
51
  def getSyncChunk(authenticationToken, afterUSN, maxEntries, fullSyncOnly)
35
52
  send_getSyncChunk(authenticationToken, afterUSN, maxEntries, fullSyncOnly)
36
53
  return recv_getSyncChunk()
@@ -1347,6 +1364,19 @@ require 'note_store_types'
1347
1364
  write_result(result, oprot, 'getSyncState', seqid)
1348
1365
  end
1349
1366
 
1367
+ def process_getSyncStateWithMetrics(seqid, iprot, oprot)
1368
+ args = read_args(iprot, GetSyncStateWithMetrics_args)
1369
+ result = GetSyncStateWithMetrics_result.new()
1370
+ begin
1371
+ result.success = @handler.getSyncStateWithMetrics(args.authenticationToken, args.clientMetrics)
1372
+ rescue Evernote::EDAM::Error::EDAMUserException => userException
1373
+ result.userException = userException
1374
+ rescue Evernote::EDAM::Error::EDAMSystemException => systemException
1375
+ result.systemException = systemException
1376
+ end
1377
+ write_result(result, oprot, 'getSyncStateWithMetrics', seqid)
1378
+ end
1379
+
1350
1380
  def process_getSyncChunk(seqid, iprot, oprot)
1351
1381
  args = read_args(iprot, GetSyncChunk_args)
1352
1382
  result = GetSyncChunk_result.new()
@@ -2456,6 +2486,44 @@ require 'note_store_types'
2456
2486
  ::Thrift::Struct.generate_accessors self
2457
2487
  end
2458
2488
 
2489
+ class GetSyncStateWithMetrics_args
2490
+ include ::Thrift::Struct, ::Thrift::Struct_Union
2491
+ AUTHENTICATIONTOKEN = 1
2492
+ CLIENTMETRICS = 2
2493
+
2494
+ FIELDS = {
2495
+ AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'},
2496
+ CLIENTMETRICS => {:type => ::Thrift::Types::STRUCT, :name => 'clientMetrics', :class => Evernote::EDAM::NoteStore::ClientUsageMetrics}
2497
+ }
2498
+
2499
+ def struct_fields; FIELDS; end
2500
+
2501
+ def validate
2502
+ end
2503
+
2504
+ ::Thrift::Struct.generate_accessors self
2505
+ end
2506
+
2507
+ class GetSyncStateWithMetrics_result
2508
+ include ::Thrift::Struct, ::Thrift::Struct_Union
2509
+ SUCCESS = 0
2510
+ USEREXCEPTION = 1
2511
+ SYSTEMEXCEPTION = 2
2512
+
2513
+ FIELDS = {
2514
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Evernote::EDAM::NoteStore::SyncState},
2515
+ USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => Evernote::EDAM::Error::EDAMUserException},
2516
+ SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => Evernote::EDAM::Error::EDAMSystemException}
2517
+ }
2518
+
2519
+ def struct_fields; FIELDS; end
2520
+
2521
+ def validate
2522
+ end
2523
+
2524
+ ::Thrift::Struct.generate_accessors self
2525
+ end
2526
+
2459
2527
  class GetSyncChunk_args
2460
2528
  include ::Thrift::Struct, ::Thrift::Struct_Union
2461
2529
  AUTHENTICATIONTOKEN = 1
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -308,14 +308,14 @@ module Evernote
308
308
  # being returned in notes (includeNoteResources is true). Otherwise,
309
309
  # only the keysOnly field will be filled in.
310
310
  # </dd>
311
- #
311
+ #
312
312
  # <dt>requireNoteContentClass</dt>
313
313
  # <dd>
314
314
  # If set, then only send notes whose content class matches this value.
315
315
  # The value can be a literal match or, if the last character is an
316
316
  # asterisk, a prefix match.
317
317
  # </dd>
318
- #
318
+ #
319
319
  # </dl>
320
320
  class SyncChunkFilter
321
321
  include ::Thrift::Struct, ::Thrift::Struct_Union
@@ -576,7 +576,7 @@ module Evernote
576
576
  # This structure is returned from calls to the findNotesMetadata function to
577
577
  # give the high-level metadata about a subset of Notes that are found to
578
578
  # match a specified NoteFilter in a search.
579
- #
579
+ #
580
580
  # <dl>
581
581
  # <dt>startIndex</dt>
582
582
  # <dd>
@@ -970,6 +970,43 @@ module Evernote
970
970
  ::Thrift::Struct.generate_accessors self
971
971
  end
972
972
 
973
+ # This structure is passed from clients to the Evernote service when they wish
974
+ # to relay coarse-grained usage metrics to the service to help improve
975
+ # products.
976
+ #
977
+ # <dl>
978
+ # <dt>sessions</dt>
979
+ # <dd>
980
+ # This field contains a count of the number of usage "sessions" that have
981
+ # occurred with this client which have not previously been reported to
982
+ # the service.
983
+ # A "session" is defined as one of the 96 fifteen-minute intervals of the
984
+ # day when someone used Evernote's interface at least once.
985
+ # So if a user interacts with an Evernote client at 12:18, 12:24, and 12:36,
986
+ # and then the client synchronizes at 12:39, it would report that there were
987
+ # two previously-unreported sessions (one session for the 12:15-12:30 time
988
+ # period, and one for the 12:30-12:45 period).
989
+ # If the user used Evernote again at 12:41 and synchronized at 12:43, it
990
+ # would not report any new sessions, because the 12:30-12:45 session had
991
+ # already been reported.
992
+ # </dd>
993
+ # </dl>
994
+ class ClientUsageMetrics
995
+ include ::Thrift::Struct, ::Thrift::Struct_Union
996
+ SESSIONS = 1
997
+
998
+ FIELDS = {
999
+ SESSIONS => {:type => ::Thrift::Types::I32, :name => 'sessions', :optional => true}
1000
+ }
1001
+
1002
+ def struct_fields; FIELDS; end
1003
+
1004
+ def validate
1005
+ end
1006
+
1007
+ ::Thrift::Struct.generate_accessors self
1008
+ end
1009
+
973
1010
  end
974
1011
  end
975
1012
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -664,11 +664,16 @@ module Evernote
664
664
 
665
665
  # A structure that wraps a map of name/value pairs whose values are not
666
666
  # always present in the structure in order to reduce space when obtaining
667
- # batches of entities that contain the map. When a client provides a LazyMap
668
- # to the server, the fullMap field must be set and the keysOnly field will
669
- # be ignored by the server. When the server provides the client with a
670
- # LazyMap, it will fill in either the keysOnly field or the fullMap field,
671
- # but not both, based on the API and parameters.
667
+ # batches of entities that contain the map.
668
+ #
669
+ # When the server provides the client with a LazyMap, it will fill in either
670
+ # the keysOnly field or the fullMap field, but never both, based on the API
671
+ # and parameters.
672
+ #
673
+ # When a client provides a LazyMap to the server as part of an update to
674
+ # an object, the server will only update the LazyMap if the fullMap field is
675
+ # set. If the fullMap field is not set, the server will not make any changes
676
+ # to the map.
672
677
  #
673
678
  # Check the API documentation of the individual calls involving the LazyMap
674
679
  # for full details including the constraints of the names and values of the
@@ -1016,9 +1021,9 @@ module Evernote
1016
1021
  # there is a trade-off when an application chooses to use contentClass.
1017
1022
  # Applications that set contentClass when creating notes must use a contentClass
1018
1023
  # string of the form <i>CompanyName.ApplicationName</i> to ensure uniqueness.</p>
1019
- # Length restrictions: EDAM_ATTRIBUTE_LEN_MIN, EDAM_ATTRIBUTE_LEN_MAX
1024
+ # Length restrictions: EDAM_NOTE_CONTENT_CLASS_LEN_MIN, EDAM_NOTE_CONTENT_CLASS_LEN_MAX
1020
1025
  # <br/>
1021
- # Regex: EDAM_ATTRIBUTE_REGEX
1026
+ # Regex: EDAM_NOTE_CONTENT_CLASS_REGEX
1022
1027
  # </dd>
1023
1028
  #
1024
1029
  # <dt>applicationData</dt>
@@ -1038,6 +1043,17 @@ module Evernote
1038
1043
  # Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX
1039
1044
  # </dd>
1040
1045
  #
1046
+ # <dt>lastEditedBy</dt>
1047
+ # <dd>An indication of who made the last change to the note. If you are
1048
+ # accessing the note via a shared notebook to which you have modification
1049
+ # rights, or if you are the owner of the notebook to which the note belongs,
1050
+ # then you have access to the value. In this case, the value will be
1051
+ # unset if the owner of the notebook containing the note was the last to
1052
+ # make the modification, else it will be a string describing the
1053
+ # guest who made the last edit. If you do not have access to this value,
1054
+ # it will be left unset. This field is read-only by clients. The server
1055
+ # will ignore all values set by clients into this field.</dd>
1056
+ #
1041
1057
  # </dl>
1042
1058
  class NoteAttributes
1043
1059
  include ::Thrift::Struct, ::Thrift::Struct_Union
@@ -1053,6 +1069,7 @@ module Evernote
1053
1069
  PLACENAME = 21
1054
1070
  CONTENTCLASS = 22
1055
1071
  APPLICATIONDATA = 23
1072
+ LASTEDITEDBY = 24
1056
1073
 
1057
1074
  FIELDS = {
1058
1075
  SUBJECTDATE => {:type => ::Thrift::Types::I64, :name => 'subjectDate', :optional => true},
@@ -1066,7 +1083,8 @@ module Evernote
1066
1083
  SHAREDATE => {:type => ::Thrift::Types::I64, :name => 'shareDate', :optional => true},
1067
1084
  PLACENAME => {:type => ::Thrift::Types::STRING, :name => 'placeName', :optional => true},
1068
1085
  CONTENTCLASS => {:type => ::Thrift::Types::STRING, :name => 'contentClass', :optional => true},
1069
- APPLICATIONDATA => {:type => ::Thrift::Types::STRUCT, :name => 'applicationData', :class => Evernote::EDAM::Type::LazyMap, :optional => true}
1086
+ APPLICATIONDATA => {:type => ::Thrift::Types::STRUCT, :name => 'applicationData', :class => Evernote::EDAM::Type::LazyMap, :optional => true},
1087
+ LASTEDITEDBY => {:type => ::Thrift::Types::STRING, :name => 'lastEditedBy', :optional => true}
1070
1088
  }
1071
1089
 
1072
1090
  def struct_fields; FIELDS; end
@@ -1311,129 +1329,6 @@ module Evernote
1311
1329
  ::Thrift::Struct.generate_accessors self
1312
1330
  end
1313
1331
 
1314
- # A unique container for a set of notes.
1315
- # <dl>
1316
- # <dt>guid</dt>
1317
- # <dd>The unique identifier of this notebook.
1318
- # <br/>
1319
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1320
- # <br/>
1321
- # Regex: EDAM_GUID_REGEX
1322
- # </dd>
1323
- #
1324
- # <dt>name</dt>
1325
- # <dd>A sequence of characters representing the name of the
1326
- # notebook. May be changed by clients, but the account may not contain two
1327
- # notebooks with names that are equal via a case-insensitive comparison.
1328
- # Can't begin or end with a space.
1329
- # <br/>
1330
- # Length: EDAM_NOTEBOOK_NAME_LEN_MIN - EDAM_NOTEBOOK_NAME_LEN_MAX
1331
- # <br/>
1332
- # Regex: EDAM_NOTEBOOK_NAME_REGEX
1333
- # </dd>
1334
- #
1335
- # <dt>updateSequenceNum</dt>
1336
- # <dd>A number identifying the last transaction to
1337
- # modify the state of this object. The USN values are sequential within an
1338
- # account, and can be used to compare the order of modifications within the
1339
- # service.
1340
- # </dd>
1341
- #
1342
- # <dt>defaultNotebook</dt>
1343
- # <dd>If true, this notebook should be used for new notes
1344
- # whenever the user has not (or cannot) specify a desired target notebook.
1345
- # For example, if a note is submitted via SMTP email.
1346
- # The service will maintain at most one defaultNotebook per account.
1347
- # If a second notebook is created or updated with defaultNotebook set to
1348
- # true, the service will automatically update the prior notebook's
1349
- # defaultNotebook field to false. If the default notebook is deleted
1350
- # (i.e. "active" set to false), the "defaultNotebook" field will be
1351
- # set to false by the service. If the account has no default notebook
1352
- # set, the service will use the most recent notebook as the default.
1353
- # </dd>
1354
- #
1355
- # <dt>serviceCreated</dt>
1356
- # <dd>The time when this notebook was created on the
1357
- # service. This will be set on the service during creation, and the service
1358
- # will provide this value when it returns a Notebook to a client.
1359
- # The service will ignore this value if it is sent by clients.
1360
- # </dd>
1361
- #
1362
- # <dt>serviceUpdated</dt>
1363
- # <dd>The time when this notebook was last modified on the
1364
- # service. This will be set on the service during creation, and the service
1365
- # will provide this value when it returns a Notebook to a client.
1366
- # The service will ignore this value if it is sent by clients.
1367
- # </dd>
1368
- #
1369
- # <dt>publishing</dt>
1370
- # <dd>If the Notebook has been opened for public access (i.e.
1371
- # if 'published' is set to true), then this will point to the set of
1372
- # publishing information for the Notebook (URI, description, etc.). A
1373
- # Notebook cannot be published without providing this information, but it
1374
- # will persist for later use if publishing is ever disabled on the Notebook.
1375
- # Clients that do not wish to change the publishing behavior of a Notebook
1376
- # should not set this value when calling NoteStore.updateNotebook().
1377
- # </dd>
1378
- #
1379
- # <dt>published</dt>
1380
- # <dd>If this is set to true, then the Notebook will be
1381
- # accessible to the public via the 'publishing' specification, which must
1382
- # also be set. If this is set to false, the Notebook will not be available
1383
- # to the public.
1384
- # Clients that do not wish to change the publishing behavior of a Notebook
1385
- # should not set this value when calling NoteStore.updateNotebook().
1386
- # </dd>
1387
- #
1388
- # <dt>stack</dt>
1389
- # <dd>If this is set, then the notebook is visually contained within a stack
1390
- # of notebooks with this name. All notebooks in the same account with the
1391
- # same 'stack' field are considered to be in the same stack.
1392
- # Notebooks with no stack set are "top level" and not contained within a
1393
- # stack.
1394
- # </dd>
1395
- #
1396
- # <dt>sharedNotebookIds</dt>
1397
- # <dd>If this notebook has been shared with one or more individuals, then
1398
- # this will contain the 'id' fields to identify those SharedNotebook
1399
- # entries in the NoteStore. This field is only set by the server, and it
1400
- # is ignored in calls to createNotebook, updateNotebook, etc.
1401
- # </dd>
1402
- # </dl>
1403
- class Notebook
1404
- include ::Thrift::Struct, ::Thrift::Struct_Union
1405
- GUID = 1
1406
- NAME = 2
1407
- UPDATESEQUENCENUM = 5
1408
- DEFAULTNOTEBOOK = 6
1409
- SERVICECREATED = 7
1410
- SERVICEUPDATED = 8
1411
- PUBLISHING = 10
1412
- PUBLISHED = 11
1413
- STACK = 12
1414
- SHAREDNOTEBOOKIDS = 13
1415
-
1416
- FIELDS = {
1417
- GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1418
- NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
1419
- UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1420
- DEFAULTNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'defaultNotebook', :optional => true},
1421
- SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
1422
- SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
1423
- PUBLISHING => {:type => ::Thrift::Types::STRUCT, :name => 'publishing', :class => Evernote::EDAM::Type::Publishing, :optional => true},
1424
- PUBLISHED => {:type => ::Thrift::Types::BOOL, :name => 'published', :optional => true},
1425
- STACK => {:type => ::Thrift::Types::STRING, :name => 'stack', :optional => true},
1426
- SHAREDNOTEBOOKIDS => {:type => ::Thrift::Types::LIST, :name => 'sharedNotebookIds', :element => {:type => ::Thrift::Types::I64}, :optional => true}
1427
- }
1428
-
1429
- def struct_fields; FIELDS; end
1430
-
1431
- def validate
1432
- end
1433
-
1434
- ::Thrift::Struct.generate_accessors self
1435
- end
1436
-
1437
1332
  # A named search associated with the account that can be quickly re-used.
1438
1333
  # <dl>
1439
1334
  # <dt>guid</dt>
@@ -1628,6 +1523,12 @@ module Evernote
1628
1523
  # <dd>the date the owner first created the share with the specific email
1629
1524
  # address</dd>
1630
1525
  #
1526
+ # <dt>serviceUpdated</dt>
1527
+ # <dd>the date the shared notebook was last updated on the service. This
1528
+ # will be updated when authenticateToSharedNotebook is called the first
1529
+ # time with a shared notebook requiring login (i.e. when the username is
1530
+ # bound to that shared notebook).</dd>
1531
+ #
1631
1532
  # <dt>username</dt>
1632
1533
  # <dd>the username of the user who can access this share.
1633
1534
  # Once it's assigned it cannot be changed.</dd>
@@ -1641,6 +1542,7 @@ module Evernote
1641
1542
  NOTEBOOKMODIFIABLE = 5
1642
1543
  REQUIRELOGIN = 6
1643
1544
  SERVICECREATED = 7
1545
+ SERVICEUPDATED = 10
1644
1546
  SHAREKEY = 8
1645
1547
  USERNAME = 9
1646
1548
 
@@ -1652,6 +1554,7 @@ module Evernote
1652
1554
  NOTEBOOKMODIFIABLE => {:type => ::Thrift::Types::BOOL, :name => 'notebookModifiable', :optional => true},
1653
1555
  REQUIRELOGIN => {:type => ::Thrift::Types::BOOL, :name => 'requireLogin', :optional => true},
1654
1556
  SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
1557
+ SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
1655
1558
  SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
1656
1559
  USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true}
1657
1560
  }
@@ -1664,6 +1567,138 @@ module Evernote
1664
1567
  ::Thrift::Struct.generate_accessors self
1665
1568
  end
1666
1569
 
1570
+ # A unique container for a set of notes.
1571
+ # <dl>
1572
+ # <dt>guid</dt>
1573
+ # <dd>The unique identifier of this notebook.
1574
+ # <br/>
1575
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1576
+ # <br/>
1577
+ # Regex: EDAM_GUID_REGEX
1578
+ # </dd>
1579
+ #
1580
+ # <dt>name</dt>
1581
+ # <dd>A sequence of characters representing the name of the
1582
+ # notebook. May be changed by clients, but the account may not contain two
1583
+ # notebooks with names that are equal via a case-insensitive comparison.
1584
+ # Can't begin or end with a space.
1585
+ # <br/>
1586
+ # Length: EDAM_NOTEBOOK_NAME_LEN_MIN - EDAM_NOTEBOOK_NAME_LEN_MAX
1587
+ # <br/>
1588
+ # Regex: EDAM_NOTEBOOK_NAME_REGEX
1589
+ # </dd>
1590
+ #
1591
+ # <dt>updateSequenceNum</dt>
1592
+ # <dd>A number identifying the last transaction to
1593
+ # modify the state of this object. The USN values are sequential within an
1594
+ # account, and can be used to compare the order of modifications within the
1595
+ # service.
1596
+ # </dd>
1597
+ #
1598
+ # <dt>defaultNotebook</dt>
1599
+ # <dd>If true, this notebook should be used for new notes
1600
+ # whenever the user has not (or cannot) specify a desired target notebook.
1601
+ # For example, if a note is submitted via SMTP email.
1602
+ # The service will maintain at most one defaultNotebook per account.
1603
+ # If a second notebook is created or updated with defaultNotebook set to
1604
+ # true, the service will automatically update the prior notebook's
1605
+ # defaultNotebook field to false. If the default notebook is deleted
1606
+ # (i.e. "active" set to false), the "defaultNotebook" field will be
1607
+ # set to false by the service. If the account has no default notebook
1608
+ # set, the service will use the most recent notebook as the default.
1609
+ # </dd>
1610
+ #
1611
+ # <dt>serviceCreated</dt>
1612
+ # <dd>The time when this notebook was created on the
1613
+ # service. This will be set on the service during creation, and the service
1614
+ # will provide this value when it returns a Notebook to a client.
1615
+ # The service will ignore this value if it is sent by clients.
1616
+ # </dd>
1617
+ #
1618
+ # <dt>serviceUpdated</dt>
1619
+ # <dd>The time when this notebook was last modified on the
1620
+ # service. This will be set on the service during creation, and the service
1621
+ # will provide this value when it returns a Notebook to a client.
1622
+ # The service will ignore this value if it is sent by clients.
1623
+ # </dd>
1624
+ #
1625
+ # <dt>publishing</dt>
1626
+ # <dd>If the Notebook has been opened for public access (i.e.
1627
+ # if 'published' is set to true), then this will point to the set of
1628
+ # publishing information for the Notebook (URI, description, etc.). A
1629
+ # Notebook cannot be published without providing this information, but it
1630
+ # will persist for later use if publishing is ever disabled on the Notebook.
1631
+ # Clients that do not wish to change the publishing behavior of a Notebook
1632
+ # should not set this value when calling NoteStore.updateNotebook().
1633
+ # </dd>
1634
+ #
1635
+ # <dt>published</dt>
1636
+ # <dd>If this is set to true, then the Notebook will be
1637
+ # accessible to the public via the 'publishing' specification, which must
1638
+ # also be set. If this is set to false, the Notebook will not be available
1639
+ # to the public.
1640
+ # Clients that do not wish to change the publishing behavior of a Notebook
1641
+ # should not set this value when calling NoteStore.updateNotebook().
1642
+ # </dd>
1643
+ #
1644
+ # <dt>stack</dt>
1645
+ # <dd>If this is set, then the notebook is visually contained within a stack
1646
+ # of notebooks with this name. All notebooks in the same account with the
1647
+ # same 'stack' field are considered to be in the same stack.
1648
+ # Notebooks with no stack set are "top level" and not contained within a
1649
+ # stack.
1650
+ # </dd>
1651
+ #
1652
+ # <dt>sharedNotebookIds</dt>
1653
+ # <dd><i>DEPRECATED</i> - replaced by sharedNotebooks.</dd>
1654
+ #
1655
+ # <dt>sharedNotebooks</dt>
1656
+ # <dd>The list of recipients to whom this notebook has been shared
1657
+ # (one SharedNotebook object per recipient email address). This field will
1658
+ # be unset if you do not have permission to access this data. If you are
1659
+ # accessing the notebook as the owner or via a shared notebook that is
1660
+ # modifiable, then you have access to this data and the value will be set.
1661
+ # This field is read-only. Clients may not make changes to shared notebooks
1662
+ # via this field.
1663
+ # </dd>
1664
+ #
1665
+ # </dl>
1666
+ class Notebook
1667
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1668
+ GUID = 1
1669
+ NAME = 2
1670
+ UPDATESEQUENCENUM = 5
1671
+ DEFAULTNOTEBOOK = 6
1672
+ SERVICECREATED = 7
1673
+ SERVICEUPDATED = 8
1674
+ PUBLISHING = 10
1675
+ PUBLISHED = 11
1676
+ STACK = 12
1677
+ SHAREDNOTEBOOKIDS = 13
1678
+ SHAREDNOTEBOOKS = 14
1679
+
1680
+ FIELDS = {
1681
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1682
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
1683
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1684
+ DEFAULTNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'defaultNotebook', :optional => true},
1685
+ SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
1686
+ SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
1687
+ PUBLISHING => {:type => ::Thrift::Types::STRUCT, :name => 'publishing', :class => Evernote::EDAM::Type::Publishing, :optional => true},
1688
+ PUBLISHED => {:type => ::Thrift::Types::BOOL, :name => 'published', :optional => true},
1689
+ STACK => {:type => ::Thrift::Types::STRING, :name => 'stack', :optional => true},
1690
+ SHAREDNOTEBOOKIDS => {:type => ::Thrift::Types::LIST, :name => 'sharedNotebookIds', :element => {:type => ::Thrift::Types::I64}, :optional => true},
1691
+ SHAREDNOTEBOOKS => {:type => ::Thrift::Types::LIST, :name => 'sharedNotebooks', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::SharedNotebook}, :optional => true}
1692
+ }
1693
+
1694
+ def struct_fields; FIELDS; end
1695
+
1696
+ def validate
1697
+ end
1698
+
1699
+ ::Thrift::Struct.generate_accessors self
1700
+ end
1701
+
1667
1702
  # A link in an users account that refers them to a public or individual share in
1668
1703
  # another user's account.
1669
1704
  #
@@ -1700,6 +1735,25 @@ module Evernote
1700
1735
  # account, and can be used to compare the order of modifications within the
1701
1736
  # service.
1702
1737
  # </dd>
1738
+ #
1739
+ # <dt>noteStoreUrl</dt>
1740
+ # <dd>
1741
+ # This field will contain the full URL that clients should use to make
1742
+ # NoteStore requests to the server shard that contains that notebook's data.
1743
+ # I.e. this is the URL that should be used to create the Thrift HTTP client
1744
+ # transport to send messages to the NoteStore service for the account.
1745
+ # </dd>
1746
+ #
1747
+ # <dt>webApiUrlPrefix:</dt>
1748
+ # <dd>
1749
+ # This field will contain the initial part of the URLs that should be used
1750
+ # to make requests to Evernote's thin client "web API", which provide
1751
+ # optimized operations for clients that aren't capable of manipulating
1752
+ # the full contents of accounts via the full Thrift data model. Clients
1753
+ # should concatenate the relative path for the various servlets onto the
1754
+ # end of this string to construct the full URL, as documented on our
1755
+ # developer web site.
1756
+ # </dd>
1703
1757
  # </dl>
1704
1758
  class LinkedNotebook
1705
1759
  include ::Thrift::Struct, ::Thrift::Struct_Union
@@ -1710,6 +1764,8 @@ module Evernote
1710
1764
  URI = 6
1711
1765
  GUID = 7
1712
1766
  UPDATESEQUENCENUM = 8
1767
+ NOTESTOREURL = 9
1768
+ WEBAPIURLPREFIX = 10
1713
1769
 
1714
1770
  FIELDS = {
1715
1771
  SHARENAME => {:type => ::Thrift::Types::STRING, :name => 'shareName', :optional => true},
@@ -1718,7 +1774,9 @@ module Evernote
1718
1774
  SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
1719
1775
  URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true},
1720
1776
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1721
- UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true}
1777
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1778
+ NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true},
1779
+ WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true}
1722
1780
  }
1723
1781
 
1724
1782
  def struct_fields; FIELDS; end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -29,6 +29,21 @@ require 'user_store_types'
29
29
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'checkVersion failed: unknown result')
30
30
  end
31
31
 
32
+ def getBootstrapInfo(locale)
33
+ send_getBootstrapInfo(locale)
34
+ return recv_getBootstrapInfo()
35
+ end
36
+
37
+ def send_getBootstrapInfo(locale)
38
+ send_message('getBootstrapInfo', GetBootstrapInfo_args, :locale => locale)
39
+ end
40
+
41
+ def recv_getBootstrapInfo()
42
+ result = receive_message(GetBootstrapInfo_result)
43
+ return result.success unless result.success.nil?
44
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getBootstrapInfo failed: unknown result')
45
+ end
46
+
32
47
  def authenticate(username, password, consumerKey, consumerSecret)
33
48
  send_authenticate(username, password, consumerKey, consumerSecret)
34
49
  return recv_authenticate()
@@ -115,6 +130,23 @@ require 'user_store_types'
115
130
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getPremiumInfo failed: unknown result')
116
131
  end
117
132
 
133
+ def getNoteStoreUrl(authenticationToken)
134
+ send_getNoteStoreUrl(authenticationToken)
135
+ return recv_getNoteStoreUrl()
136
+ end
137
+
138
+ def send_getNoteStoreUrl(authenticationToken)
139
+ send_message('getNoteStoreUrl', GetNoteStoreUrl_args, :authenticationToken => authenticationToken)
140
+ end
141
+
142
+ def recv_getNoteStoreUrl()
143
+ result = receive_message(GetNoteStoreUrl_result)
144
+ return result.success unless result.success.nil?
145
+ raise result.userException unless result.userException.nil?
146
+ raise result.systemException unless result.systemException.nil?
147
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getNoteStoreUrl failed: unknown result')
148
+ end
149
+
118
150
  end
119
151
 
120
152
  class Processor
@@ -127,6 +159,13 @@ require 'user_store_types'
127
159
  write_result(result, oprot, 'checkVersion', seqid)
128
160
  end
129
161
 
162
+ def process_getBootstrapInfo(seqid, iprot, oprot)
163
+ args = read_args(iprot, GetBootstrapInfo_args)
164
+ result = GetBootstrapInfo_result.new()
165
+ result.success = @handler.getBootstrapInfo(args.locale)
166
+ write_result(result, oprot, 'getBootstrapInfo', seqid)
167
+ end
168
+
130
169
  def process_authenticate(seqid, iprot, oprot)
131
170
  args = read_args(iprot, Authenticate_args)
132
171
  result = Authenticate_result.new()
@@ -194,6 +233,19 @@ require 'user_store_types'
194
233
  write_result(result, oprot, 'getPremiumInfo', seqid)
195
234
  end
196
235
 
236
+ def process_getNoteStoreUrl(seqid, iprot, oprot)
237
+ args = read_args(iprot, GetNoteStoreUrl_args)
238
+ result = GetNoteStoreUrl_result.new()
239
+ begin
240
+ result.success = @handler.getNoteStoreUrl(args.authenticationToken)
241
+ rescue Evernote::EDAM::Error::EDAMUserException => userException
242
+ result.userException = userException
243
+ rescue Evernote::EDAM::Error::EDAMSystemException => systemException
244
+ result.systemException = systemException
245
+ end
246
+ write_result(result, oprot, 'getNoteStoreUrl', seqid)
247
+ end
248
+
197
249
  end
198
250
 
199
251
  # HELPER FUNCTIONS AND STRUCTURES
@@ -207,7 +259,7 @@ require 'user_store_types'
207
259
  FIELDS = {
208
260
  CLIENTNAME => {:type => ::Thrift::Types::STRING, :name => 'clientName'},
209
261
  EDAMVERSIONMAJOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMajor', :default => 1},
210
- EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 20}
262
+ EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 21}
211
263
  }
212
264
 
213
265
  def struct_fields; FIELDS; end
@@ -234,6 +286,38 @@ require 'user_store_types'
234
286
  ::Thrift::Struct.generate_accessors self
235
287
  end
236
288
 
289
+ class GetBootstrapInfo_args
290
+ include ::Thrift::Struct, ::Thrift::Struct_Union
291
+ LOCALE = 1
292
+
293
+ FIELDS = {
294
+ LOCALE => {:type => ::Thrift::Types::STRING, :name => 'locale'}
295
+ }
296
+
297
+ def struct_fields; FIELDS; end
298
+
299
+ def validate
300
+ end
301
+
302
+ ::Thrift::Struct.generate_accessors self
303
+ end
304
+
305
+ class GetBootstrapInfo_result
306
+ include ::Thrift::Struct, ::Thrift::Struct_Union
307
+ SUCCESS = 0
308
+
309
+ FIELDS = {
310
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Evernote::EDAM::UserStore::BootstrapInfo}
311
+ }
312
+
313
+ def struct_fields; FIELDS; end
314
+
315
+ def validate
316
+ end
317
+
318
+ ::Thrift::Struct.generate_accessors self
319
+ end
320
+
237
321
  class Authenticate_args
238
322
  include ::Thrift::Struct, ::Thrift::Struct_Union
239
323
  USERNAME = 1
@@ -422,6 +506,42 @@ require 'user_store_types'
422
506
  ::Thrift::Struct.generate_accessors self
423
507
  end
424
508
 
509
+ class GetNoteStoreUrl_args
510
+ include ::Thrift::Struct, ::Thrift::Struct_Union
511
+ AUTHENTICATIONTOKEN = 1
512
+
513
+ FIELDS = {
514
+ AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
515
+ }
516
+
517
+ def struct_fields; FIELDS; end
518
+
519
+ def validate
520
+ end
521
+
522
+ ::Thrift::Struct.generate_accessors self
523
+ end
524
+
525
+ class GetNoteStoreUrl_result
526
+ include ::Thrift::Struct, ::Thrift::Struct_Union
527
+ SUCCESS = 0
528
+ USEREXCEPTION = 1
529
+ SYSTEMEXCEPTION = 2
530
+
531
+ FIELDS = {
532
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
533
+ USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => Evernote::EDAM::Error::EDAMUserException},
534
+ SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => Evernote::EDAM::Error::EDAMSystemException}
535
+ }
536
+
537
+ def struct_fields; FIELDS; end
538
+
539
+ def validate
540
+ end
541
+
542
+ ::Thrift::Struct.generate_accessors self
543
+ end
544
+
425
545
  end
426
546
 
427
547
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -11,7 +11,7 @@ require 'user_store_types'
11
11
  module UserStore
12
12
  EDAM_VERSION_MAJOR = 1
13
13
 
14
- EDAM_VERSION_MINOR = 20
14
+ EDAM_VERSION_MINOR = 21
15
15
 
16
16
  end
17
17
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -30,14 +30,20 @@ module Evernote
30
30
  # <dd>
31
31
  # The name of the virtual server that manages the state of
32
32
  # this user. This value is used internally to determine which system should
33
- # service requests about this user's data. It is also used to construct
34
- # the appropriate URL to make requests from the NoteStore.
33
+ # service requests about this user's data.
35
34
  # </dd>
36
35
  # <dt>privilege:</dt>
37
36
  # <dd>
38
37
  # The privilege level of the account, to determine whether
39
38
  # this is a Premium or Free account.
40
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>
41
47
  # </dl>
42
48
  class PublicUserInfo
43
49
  include ::Thrift::Struct, ::Thrift::Struct_Union
@@ -45,12 +51,14 @@ module Evernote
45
51
  SHARDID = 2
46
52
  PRIVILEGE = 3
47
53
  USERNAME = 4
54
+ NOTESTOREURL = 5
48
55
 
49
56
  FIELDS = {
50
57
  USERID => {:type => ::Thrift::Types::I32, :name => 'userId'},
51
58
  SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId'},
52
59
  PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::PrivilegeLevel},
53
- USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true}
60
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
61
+ NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true}
54
62
  }
55
63
 
56
64
  def struct_fields; FIELDS; end
@@ -82,8 +90,8 @@ module Evernote
82
90
  # </dd>
83
91
  # <dt>premiumExpirationDate:</dt>
84
92
  # <dd>
85
- # The date when the user's Premium account expires, or the date when the user's
86
- # account will be charged if it has a recurring payment method.
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.
87
95
  # </dd>
88
96
  # <dt>premiumExtendable:</dt>
89
97
  # <dd>
@@ -95,8 +103,8 @@ module Evernote
95
103
  # </dd>
96
104
  # <dt>premiumCancellationPending:</dt>
97
105
  # <dd>
98
- # True if the user has requested that no further charges to be made; the Premium
99
- # account will remain active until it expires.
106
+ # True if the user has requested that no further charges to be made; the
107
+ # Premium account will remain active until it expires.
100
108
  # </dd>
101
109
  # <dt>canPurchaseUploadAllowance:</dt>
102
110
  # <dd>
@@ -110,6 +118,14 @@ module Evernote
110
118
  # <dd>
111
119
  # The role of the user within a sponsored group.
112
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>
113
129
  # </dl>
114
130
  class PremiumInfo
115
131
  include ::Thrift::Struct, ::Thrift::Struct_Union
@@ -123,6 +139,8 @@ module Evernote
123
139
  CANPURCHASEUPLOADALLOWANCE = 8
124
140
  SPONSOREDGROUPNAME = 9
125
141
  SPONSOREDGROUPROLE = 10
142
+ BUSINESSNAME = 11
143
+ BUSINESSADMIN = 12
126
144
 
127
145
  FIELDS = {
128
146
  CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
@@ -134,7 +152,9 @@ module Evernote
134
152
  PREMIUMCANCELLATIONPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumCancellationPending'},
135
153
  CANPURCHASEUPLOADALLOWANCE => {:type => ::Thrift::Types::BOOL, :name => 'canPurchaseUploadAllowance'},
136
154
  SPONSOREDGROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'sponsoredGroupName', :optional => true},
137
- SPONSOREDGROUPROLE => {:type => ::Thrift::Types::I32, :name => 'sponsoredGroupRole', :optional => true, :enum_class => Evernote::EDAM::UserStore::SponsoredGroupRole}
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}
138
158
  }
139
159
 
140
160
  def struct_fields; FIELDS; end
@@ -187,6 +207,23 @@ module Evernote
187
207
  # access the full User structure, this field may be set to give back
188
208
  # a more limited public set of data.
189
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>
190
227
  # </dl>
191
228
  class AuthenticationResult
192
229
  include ::Thrift::Struct, ::Thrift::Struct_Union
@@ -195,13 +232,17 @@ module Evernote
195
232
  EXPIRATION = 3
196
233
  USER = 4
197
234
  PUBLICUSERINFO = 5
235
+ NOTESTOREURL = 6
236
+ WEBAPIURLPREFIX = 7
198
237
 
199
238
  FIELDS = {
200
239
  CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
201
240
  AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'},
202
241
  EXPIRATION => {:type => ::Thrift::Types::I64, :name => 'expiration'},
203
242
  USER => {:type => ::Thrift::Types::STRUCT, :name => 'user', :class => Evernote::EDAM::Type::User, :optional => true},
204
- PUBLICUSERINFO => {:type => ::Thrift::Types::STRUCT, :name => 'publicUserInfo', :class => Evernote::EDAM::UserStore::PublicUserInfo, :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}
205
246
  }
206
247
 
207
248
  def struct_fields; FIELDS; end
@@ -215,6 +256,160 @@ module Evernote
215
256
  ::Thrift::Struct.generate_accessors self
216
257
  end
217
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
+
218
413
  end
219
414
  end
220
415
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evernote
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-23 00:00:00.000000000Z
12
+ date: 2012-06-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thrift_client
16
- requirement: &70255822716660 !ruby/object:Gem::Requirement
16
+ requirement: &70191792258240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.8.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70255822716660
24
+ version_requirements: *70191792258240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70255822716280 !ruby/object:Gem::Requirement
27
+ requirement: &70191792257860 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70255822716280
35
+ version_requirements: *70191792257860
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: yard
38
- requirement: &70255822715820 !ruby/object:Gem::Requirement
38
+ requirement: &70191792257400 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70255822715820
46
+ version_requirements: *70191792257400
47
47
  description: A high level wrapper around Evernote's Thrift-generated ruby code. It
48
48
  bundles up Evernote's thrift-generated code and creates some simple wrapper classes.
49
49
  email: