From d075e04fc0a5aec62ecba37581833f494affd6cd Mon Sep 17 00:00:00 2001 From: Kip Cole Date: Mon, 1 Oct 2012 08:31:40 +0800 Subject: Updating to api version 1.2.2 --- lib/evernote/version.rb | 2 +- vendor/gen-rb/evernote/edam/limits_constants.rb | 12 +++ vendor/gen-rb/evernote/edam/note_store.rb | 75 ++++++++++++++ vendor/gen-rb/evernote/edam/note_store_types.rb | 115 +++++++++++++++++++++ vendor/gen-rb/evernote/edam/user_store.rb | 2 +- .../gen-rb/evernote/edam/user_store_constants.rb | 2 +- vendor/gen-rb/evernote/edam/user_store_types.rb | 4 +- 7 files changed, 208 insertions(+), 4 deletions(-) diff --git a/lib/evernote/version.rb b/lib/evernote/version.rb index 7ed4354..18bab01 100644 --- a/lib/evernote/version.rb +++ b/lib/evernote/version.rb @@ -1,3 +1,3 @@ module Evernote - VERSION = "1.2.1" + VERSION = "1.2.2" end diff --git a/vendor/gen-rb/evernote/edam/limits_constants.rb b/vendor/gen-rb/evernote/edam/limits_constants.rb index c5a138b..05a6438 100644 --- a/vendor/gen-rb/evernote/edam/limits_constants.rb +++ b/vendor/gen-rb/evernote/edam/limits_constants.rb @@ -235,6 +235,18 @@ require 'limits_types' EDAM_CONTENT_CLASS_FOOD_MEAL = %q"evernote.food.meal" + EDAM_CONTENT_CLASS_SKITCH = %q"evernote.skitch" + + EDAM_RELATED_PLAINTEXT_LEN_MIN = 1 + + EDAM_RELATED_PLAINTEXT_LEN_MAX = 131072 + + EDAM_RELATED_MAX_NOTES = 25 + + EDAM_RELATED_MAX_NOTEBOOKS = 1 + + EDAM_RELATED_MAX_TAGS = 25 + end end end diff --git a/vendor/gen-rb/evernote/edam/note_store.rb b/vendor/gen-rb/evernote/edam/note_store.rb index 9575023..ae18068 100644 --- a/vendor/gen-rb/evernote/edam/note_store.rb +++ b/vendor/gen-rb/evernote/edam/note_store.rb @@ -1346,6 +1346,24 @@ require 'note_store_types' raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticateToSharedNote failed: unknown result') end + def findRelated(authenticationToken, query, resultSpec) + send_findRelated(authenticationToken, query, resultSpec) + return recv_findRelated() + end + + def send_findRelated(authenticationToken, query, resultSpec) + send_message('findRelated', FindRelated_args, :authenticationToken => authenticationToken, :query => query, :resultSpec => resultSpec) + end + + def recv_findRelated() + result = receive_message(FindRelated_result) + return result.success unless result.success.nil? + raise result.userException unless result.userException.nil? + raise result.systemException unless result.systemException.nil? + raise result.notFoundException unless result.notFoundException.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'findRelated failed: unknown result') + end + end class Processor @@ -2446,6 +2464,21 @@ require 'note_store_types' write_result(result, oprot, 'authenticateToSharedNote', seqid) end + def process_findRelated(seqid, iprot, oprot) + args = read_args(iprot, FindRelated_args) + result = FindRelated_result.new() + begin + result.success = @handler.findRelated(args.authenticationToken, args.query, args.resultSpec) + rescue Evernote::EDAM::Error::EDAMUserException => userException + result.userException = userException + rescue Evernote::EDAM::Error::EDAMSystemException => systemException + result.systemException = systemException + rescue Evernote::EDAM::Error::EDAMNotFoundException => notFoundException + result.notFoundException = notFoundException + end + write_result(result, oprot, 'findRelated', seqid) + end + end # HELPER FUNCTIONS AND STRUCTURES @@ -5480,6 +5513,48 @@ require 'note_store_types' ::Thrift::Struct.generate_accessors self end + class FindRelated_args + include ::Thrift::Struct, ::Thrift::Struct_Union + AUTHENTICATIONTOKEN = 1 + QUERY = 2 + RESULTSPEC = 3 + + FIELDS = { + AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}, + QUERY => {:type => ::Thrift::Types::STRUCT, :name => 'query', :class => Evernote::EDAM::NoteStore::RelatedQuery}, + RESULTSPEC => {:type => ::Thrift::Types::STRUCT, :name => 'resultSpec', :class => Evernote::EDAM::NoteStore::RelatedResultSpec} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FindRelated_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + USEREXCEPTION = 1 + SYSTEMEXCEPTION = 2 + NOTFOUNDEXCEPTION = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Evernote::EDAM::NoteStore::RelatedResult}, + USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => Evernote::EDAM::Error::EDAMUserException}, + SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => Evernote::EDAM::Error::EDAMSystemException}, + NOTFOUNDEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'notFoundException', :class => Evernote::EDAM::Error::EDAMNotFoundException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + end end diff --git a/vendor/gen-rb/evernote/edam/note_store_types.rb b/vendor/gen-rb/evernote/edam/note_store_types.rb index bd91f14..3884236 100644 --- a/vendor/gen-rb/evernote/edam/note_store_types.rb +++ b/vendor/gen-rb/evernote/edam/note_store_types.rb @@ -1007,6 +1007,121 @@ module Evernote ::Thrift::Struct.generate_accessors self end + # A description of the thing for which we are searching for related + # entities. You must choose exactly one field. + # + #
+ #
noteGuid
+ #
The GUID of an existing note in your account for which related + # entities will be found.
+ # + #
plainText
+ #
A string of plain text for which to find related entities. + # You should provide a text block with a number of characters between + # EDAM_RELATED_PLAINTEXT_LEN_MIN and EDAM_RELATED_PLAINTEXT_LEN_MAX. + #
+ #
+ class RelatedQuery + include ::Thrift::Struct, ::Thrift::Struct_Union + NOTEGUID = 1 + PLAINTEXT = 2 + + FIELDS = { + NOTEGUID => {:type => ::Thrift::Types::STRING, :name => 'noteGuid', :optional => true}, + PLAINTEXT => {:type => ::Thrift::Types::STRING, :name => 'plainText', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + # The result of calling findRelated(). The contents of the notes, + # notebooks, and tags fields will be in decreasing order of expected + # relevance. It is possible that fewer results than requested will be + # returned even if there are enough distinct entities in the account + # in cases where the relevance is estimated to be low. + # + #
+ #
notes
+ #
If notes have been requested to be included, this will be the + # list of notes.
+ # + #
notebooks
+ #
If notebooks have been requested to be included, this will be the + # list of notebooks.
+ # + #
tags
+ #
If tags have been requested to be included, this will be the list + # of tags.
+ #
+ class RelatedResult + include ::Thrift::Struct, ::Thrift::Struct_Union + NOTES = 1 + NOTEBOOKS = 2 + TAGS = 3 + + FIELDS = { + NOTES => {:type => ::Thrift::Types::LIST, :name => 'notes', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::Note}, :optional => true}, + NOTEBOOKS => {:type => ::Thrift::Types::LIST, :name => 'notebooks', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::Notebook}, :optional => true}, + TAGS => {:type => ::Thrift::Types::LIST, :name => 'tags', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::Tag}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + # A description of the thing for which the service will find related + # entities, via findRelated(), together with a description of what + # type of entities and how many you are seeking in the + # RelatednessResult. + # + #
+ #
maxNotes
+ #
Return notes that are related to the query, but no more than + # this many. Any value greater than EDAM_RELATED_MAX_NOTES + # will be silently capped. If you do not set this field, then + # no notes will be returned.
+ # + #
maxNotebooks
+ #
Return notebooks that are related to the query, but no more than + # this many. Any value greater than EDAM_RELATED_MAX_NOTEBOOKS + # will be silently capped. If you do not set this field, then + # no notebooks will be returned.
+ # + #
maxTags
+ #
Return tags that are related to the query, but no more than + # this many. Any value greater than EDAM_RELATED_MAX_TAGS + # will be silently capped. If you do not set this field, then + # no tags will be returned.
+ #
+ class RelatedResultSpec + include ::Thrift::Struct, ::Thrift::Struct_Union + MAXNOTES = 1 + MAXNOTEBOOKS = 2 + MAXTAGS = 3 + + FIELDS = { + MAXNOTES => {:type => ::Thrift::Types::I32, :name => 'maxNotes', :optional => true}, + MAXNOTEBOOKS => {:type => ::Thrift::Types::I32, :name => 'maxNotebooks', :optional => true}, + MAXTAGS => {:type => ::Thrift::Types::I32, :name => 'maxTags', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + end end end diff --git a/vendor/gen-rb/evernote/edam/user_store.rb b/vendor/gen-rb/evernote/edam/user_store.rb index 08f8343..0262626 100644 --- a/vendor/gen-rb/evernote/edam/user_store.rb +++ b/vendor/gen-rb/evernote/edam/user_store.rb @@ -259,7 +259,7 @@ require 'user_store_types' FIELDS = { CLIENTNAME => {:type => ::Thrift::Types::STRING, :name => 'clientName'}, EDAMVERSIONMAJOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMajor', :default => 1}, - EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 21} + EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 22} } def struct_fields; FIELDS; end diff --git a/vendor/gen-rb/evernote/edam/user_store_constants.rb b/vendor/gen-rb/evernote/edam/user_store_constants.rb index 10a8229..9ecdb3f 100644 --- a/vendor/gen-rb/evernote/edam/user_store_constants.rb +++ b/vendor/gen-rb/evernote/edam/user_store_constants.rb @@ -11,7 +11,7 @@ require 'user_store_types' module UserStore EDAM_VERSION_MAJOR = 1 - EDAM_VERSION_MINOR = 21 + EDAM_VERSION_MINOR = 22 end end diff --git a/vendor/gen-rb/evernote/edam/user_store_types.rb b/vendor/gen-rb/evernote/edam/user_store_types.rb index c8a5a37..e04f692 100644 --- a/vendor/gen-rb/evernote/edam/user_store_types.rb +++ b/vendor/gen-rb/evernote/edam/user_store_types.rb @@ -326,6 +326,7 @@ module Evernote ENABLESINGLENOTESHARING = 9 ENABLESPONSOREDACCOUNTS = 10 ENABLETWITTERSHARING = 11 + ENABLELINKEDINSHARING = 12 FIELDS = { SERVICEHOST => {:type => ::Thrift::Types::STRING, :name => 'serviceHost'}, @@ -338,7 +339,8 @@ module Evernote ENABLESHAREDNOTEBOOKS => {:type => ::Thrift::Types::BOOL, :name => 'enableSharedNotebooks', :optional => true}, ENABLESINGLENOTESHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableSingleNoteSharing', :optional => true}, ENABLESPONSOREDACCOUNTS => {:type => ::Thrift::Types::BOOL, :name => 'enableSponsoredAccounts', :optional => true}, - ENABLETWITTERSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableTwitterSharing', :optional => true} + ENABLETWITTERSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableTwitterSharing', :optional => true}, + ENABLELINKEDINSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableLinkedInSharing', :optional => true} } def struct_fields; FIELDS; end -- cgit v1.2.3