Repository: jamiesun/SublimeEvernote Branch: master Commit: 62eeccabca6c Files: 67 Total size: 1.7 MB Directory structure: gitextract__f99c86o/ ├── .gitattributes ├── .gitignore ├── Context.sublime-menu ├── Default (Linux).sublime-keymap ├── Default (OSX).sublime-keymap ├── Default (Windows).sublime-keymap ├── Default.sublime-commands ├── Readme.md ├── SublimeEvernoteMetadata.sublime-snippet ├── lib/ │ ├── __init__.py │ ├── evernote/ │ │ ├── __init__.py │ │ ├── api/ │ │ │ ├── __init__.py │ │ │ └── client.py │ │ └── edam/ │ │ ├── __init__.py │ │ ├── error/ │ │ │ ├── __init__.py │ │ │ ├── constants.py │ │ │ └── ttypes.py │ │ ├── limits/ │ │ │ ├── __init__.py │ │ │ ├── constants.py │ │ │ └── ttypes.py │ │ ├── notestore/ │ │ │ ├── NoteStore-remote │ │ │ ├── NoteStore.py │ │ │ ├── __init__.py │ │ │ ├── constants.py │ │ │ └── ttypes.py │ │ ├── type/ │ │ │ ├── __init__.py │ │ │ ├── constants.py │ │ │ └── ttypes.py │ │ └── userstore/ │ │ ├── UserStore-remote │ │ ├── UserStore.py │ │ ├── __init__.py │ │ ├── constants.py │ │ └── ttypes.py │ ├── httplib.py │ ├── httplib2/ │ │ ├── __init__.py │ │ ├── cacerts.txt │ │ ├── iri2uri.py │ │ └── socks.py │ ├── markdown2.py │ ├── oauth2/ │ │ ├── __init__.py │ │ ├── _version.py │ │ └── clients/ │ │ ├── __init__.py │ │ ├── imap.py │ │ └── smtp.py │ └── thrift/ │ ├── TSCons.py │ ├── TSerialization.py │ ├── Thrift.py │ ├── __init__.py │ ├── protocol/ │ │ ├── TBase.py │ │ ├── TBinaryProtocol.py │ │ ├── TCompactProtocol.py │ │ ├── TProtocol.py │ │ ├── __init__.py │ │ └── fastbinary.c │ ├── server/ │ │ ├── THttpServer.py │ │ ├── TNonblockingServer.py │ │ ├── TProcessPoolServer.py │ │ ├── TServer.py │ │ └── __init__.py │ └── transport/ │ ├── THttpClient.py │ ├── TSSLSocket.py │ ├── TSocket.py │ ├── TTransport.py │ ├── TTwisted.py │ ├── TZlibTransport.py │ └── __init__.py └── sublime_evernote.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ # Auto detect text files and perform LF normalization * text=auto # Custom for Visual Studio *.cs diff=csharp *.sln merge=union *.csproj merge=union *.vbproj merge=union *.fsproj merge=union *.dbproj merge=union # Standard to msysgit *.doc diff=astextplain *.DOC diff=astextplain *.docx diff=astextplain *.DOCX diff=astextplain *.dot diff=astextplain *.DOT diff=astextplain *.pdf diff=astextplain *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain ================================================ FILE: .gitignore ================================================ ################# ## Eclipse ################# *.pydevproject .project .metadata bin/ tmp/ *.tmp *.bak *.swp *~.nib local.properties .classpath .settings/ .loadpath # External tool builders .externalToolBuilders/ # Locally stored "Eclipse launch configurations" *.launch # CDT-specific .cproject # PDT-specific .buildpath ################# ## Visual Studio ################# ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.sln.docstates # Build results [Dd]ebug/ [Rr]elease/ *_i.c *_p.c *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.vspscc .builds *.dotCover ## TODO: If you have NuGet Package Restore enabled, uncomment this #packages/ # Visual C++ cache files ipch/ *.aps *.ncb *.opensdf *.sdf # Visual Studio profiler *.psess *.vsp # ReSharper is a .NET coding add-in _ReSharper* # Installshield output folder [Ee]xpress # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish # Others [Bb]in [Oo]bj sql TestResults *.Cache ClientBin stylecop.* ~$* *.dbmdl Generated_Code #added for RIA/Silverlight projects # Backup & report files from converting an old project file to a newer # Visual Studio version. Backup files are not needed, because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML ############ ## Windows ############ # Windows image file caches Thumbs.db # Folder config file Desktop.ini ############# ## Python ############# *.py[co] # Packages *.egg *.egg-info dist build eggs parts bin var sdist develop-eggs .installed.cfg # Installer logs pip-log.txt # Unit test / coverage reports .coverage .tox #Translations *.mo #Mr Developer .mr.developer.cfg # Mac crap .DS_Store sftp-config.json sftp-config-alt.json logs sessions ================================================ FILE: Context.sublime-menu ================================================ [ { "caption": "-" }, { "command":"send_to_evernote", "caption":"Send to Evernote" }, { "caption": "Evernote Settings", "command": "open_file", "args": { "file": "${packages}/User/SublimeEvernote.sublime-settings" } }, { "caption": "-" } ] ================================================ FILE: Default (Linux).sublime-keymap ================================================ [ { "keys": ["ctrl+alt+e"], "command": "send_to_evernote" } ] ================================================ FILE: Default (OSX).sublime-keymap ================================================ [ { "keys": ["super+alt+e"], "command": "send_to_evernote" } ] ================================================ FILE: Default (Windows).sublime-keymap ================================================ [ { "keys": ["ctrl+alt+e"], "command": "send_to_evernote" } ] ================================================ FILE: Default.sublime-commands ================================================ [ { "command": "send_to_evernote", "caption": "Send to evernote" }, { "caption": "Evernote Settings", "command": "open_file", "args": { "file": "${packages}/User/SublimeEvernote.sublime-settings" } } ] ================================================ FILE: Readme.md ================================================ SublimeEvernote =============== [Sublime Text 2](http://www.sublimetext.com/2) plugin for [Evernote](http://www.evernote.com) ### Install Through [Package Control](http://wbond.net/sublime_packages/package_control) `Command Palette` > `Package Control: Install Package` > `SublimeEvernote` or `Command Palette` > `Package Control: add Repository` && `input 'http://github.com/jamiesun/SublimeEvernote` `Command Palette` > `Package Control: Install Package` > `SublimeEvernote` or clone this repository in * Windows: `%APPDATA%/Roaming/Sublime Text 2/Packages/` * OSX: `~/Library/Application Support/Sublime Text 2/Packages/` * Linux: `~/.Sublime Text 2/Packages/` * Portable Installation: `Sublime Text 2/Data/` ### Usage `Command Palette` > `Send to evernote` `Context menu` > `Send to Evernote` `Context menu` > `Evernote settings` #### Markdown Support #### Write notes in Markdown and they will be processed when they are sent to Evernote. This: ![this](https://dl.dropbox.com/u/643062/SublimeEvernoteScreenshots/Markdown.png) Turns into this: ![this](https://dl.dropbox.com/u/643062/SublimeEvernoteScreenshots/Evernote.png) #### Authenticating with Evernote #### In order to send notes you need to authenticate and allow the plugin permissions via Evernote's oauth. This is a bit of a manual process now as there are no callbacks to Sublime to handle this process automatically. Here are a collection of screenshots to step you through the process. ##### Step 1 - Sublime text2 open your browser,you need login: ![login](https://raw.githubusercontent.com/jamiesun/SublimeEvernote/master/snapshot/login.png) ##### Step 2 - Authorize plugin with Evernote: ![authorize](https://raw.github.com/dencold/static/master/images/sublimeevernote/2_authorize.png) ##### Step 3 - Copy oauth verifier ![redirect](https://raw.github.com/dencold/static/master/images/sublimeevernote/3_redirect.png) ![verifier](https://raw.github.com/dencold/static/master/images/sublimeevernote/4_oauth_verifier.png) ##### Step 4 - Verify token on Sublime ![redirect](https://raw.github.com/dencold/static/master/images/sublimeevernote/5_verify_sublime.png) ##### Step 5 - Rejoice! ![redirect](https://raw.github.com/dencold/static/master/images/sublimeevernote/6_rejoice.png) #### Metadata #### Use metadata block to specify title and tags. --- title: My Note tags: tag1,tag2 --- ================================================ FILE: SublimeEvernoteMetadata.sublime-snippet ================================================ Evernote Metadata text.plain,text.html,text.html.markdown,text.html.markdown.multimarkdown ================================================ FILE: lib/__init__.py ================================================ ================================================ FILE: lib/evernote/__init__.py ================================================ ================================================ FILE: lib/evernote/api/__init__.py ================================================ ================================================ FILE: lib/evernote/api/client.py ================================================ import sys import functools import inspect import re import oauth2 as oauth import urllib import urlparse import evernote.edam.userstore.UserStore as UserStore import evernote.edam.notestore.NoteStore as NoteStore import evernote.edam.userstore.constants as UserStoreConstants import thrift.protocol.TBinaryProtocol as TBinaryProtocol import thrift.transport.THttpClient as THttpClient class EvernoteClient(object): def __init__(self, **options): self.consumer_key = options.get('consumer_key') self.consumer_secret = options.get('consumer_secret') self.sandbox = options.get('sandbox', True) if self.sandbox: default_service_host = 'sandbox.evernote.com' else: default_service_host = 'www.evernote.com' self.service_host = options.get('service_host', default_service_host) self.additional_headers = options.get('additional_headers', {}) self.token = options.get('token') self.secret = options.get('secret') def get_request_token(self, callback_url): client = self._get_oauth_client() request_url = '%s?oauth_callback=%s' % ( self._get_endpoint('oauth'), urllib.quote(callback_url)) resp, content = client.request(request_url, 'GET') request_token = dict(urlparse.parse_qsl(content)) return request_token def get_authorize_url(self, request_token): return '%s?oauth_token=%s' % ( self._get_endpoint('OAuth.action'), urllib.quote(request_token['oauth_token'])) def get_access_token( self, oauth_token, oauth_token_secret, oauth_verifier ): token = oauth.Token(oauth_token, oauth_token_secret) token.set_verifier(oauth_verifier) client = self._get_oauth_client(token) resp, content = client.request(self._get_endpoint('oauth'), 'POST') access_token = dict(urlparse.parse_qsl(content)) self.token = access_token['oauth_token'] return self.token def get_user_store(self): user_store_uri = self._get_endpoint("/edam/user") store = Store(self.token, UserStore.Client, user_store_uri) if not store: # Trick for PyDev code completion store = UserStore.Client() raise Exception('Should never reach here') return store def get_note_store(self): user_store = self.get_user_store() note_store_uri = user_store.getNoteStoreUrl() store = Store(self.token, NoteStore.Client, note_store_uri) if not store: # Trick for PyDev code completion store = NoteStore.Client() raise Exception('Should never reach here') return store def get_shared_note_store(self, linkedNotebook): note_store_uri = linkedNotebook.noteStoreUrl note_store = Store(self.token, NoteStore.Client, note_store_uri) shared_auth = note_store.authenticateToSharedNotebook( linkedNotebook.shareKey) shared_token = shared_auth.authenticationToken store = Store(shared_token, NoteStore.Client, note_store_uri) if not store: # Trick for PyDev code completion store = NoteStore.Client() raise Exception('Should never reach here') return store def get_business_note_store(self): user_store = self.get_user_store() biz_auth = user_store.authenticateToBusiness() biz_token = biz_auth.authenticationToken note_store_uri = biz_auth.noteStoreUrl store = Store(biz_token, NoteStore.Client, note_store_uri) if not store: # Trick for PyDev code completion store = NoteStore.Client() raise Exception('Should never reach here') return store def _get_oauth_client(self, token=None): consumer = oauth.Consumer(self.consumer_key, self.consumer_secret) if token: client = oauth.Client(consumer, token) else: client = oauth.Client(consumer) return client def _get_endpoint(self, path=None): url = "https://%s" % (self.service_host) if path is not None: url += "/%s" % path return url class Store(object): def __init__(self, token, client_class, store_url): self.token = token m = re.search(':A=(.+):', token) if m: self._user_agent_id = m.groups()[0] else: self._user_agent_id = '' self._client = self._get_thrift_client(client_class, store_url) def __getattr__(self, name): def delegate_method(*args, **kwargs): targetMethod = getattr(self._client, name, None) if targetMethod is None: return object.__getattribute__(self, name)(*args, **kwargs) org_args = inspect.getargspec(targetMethod).args if len(org_args) == len(args) + 1: return targetMethod(*args, **kwargs) elif 'authenticationToken' in org_args: skip_args = ['self', 'authenticationToken'] arg_names = [i for i in org_args if i not in skip_args] return functools.partial( targetMethod, authenticationToken=self.token )(**dict(zip(arg_names, args))) else: return targetMethod(*args, **kwargs) return delegate_method def _get_thrift_client(self, client_class, url): http_client = THttpClient.THttpClient(url) http_client.addHeaders(**{ 'User-Agent': "%s / %s; Python / %s;" % (self._user_agent_id, self._get_sdk_version(), sys.version) }) thrift_protocol = TBinaryProtocol.TBinaryProtocol(http_client) return client_class(thrift_protocol) def _get_sdk_version(self): return '%s.%s' % ( UserStoreConstants.EDAM_VERSION_MAJOR, UserStoreConstants.EDAM_VERSION_MINOR ) ================================================ FILE: lib/evernote/edam/__init__.py ================================================ ================================================ FILE: lib/evernote/edam/error/__init__.py ================================================ __all__ = ['ttypes', 'constants'] ================================================ FILE: lib/evernote/edam/error/constants.py ================================================ # # Autogenerated by Thrift Compiler # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * ================================================ FILE: lib/evernote/edam/error/ttypes.py ================================================ # # Autogenerated by Thrift Compiler # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: fastbinary = None class EDAMErrorCode(object): """ Numeric codes indicating the type of error that occurred on the service.
UNKNOWN
No information available about the error
BAD_DATA_FORMAT
The format of the request data was incorrect
PERMISSION_DENIED
Not permitted to perform action
INTERNAL_ERROR
Unexpected problem with the service
DATA_REQUIRED
A required parameter/field was absent
LIMIT_REACHED
Operation denied due to data model limit
QUOTA_REACHED
Operation denied due to user storage limit
INVALID_AUTH
Username and/or password incorrect
AUTH_EXPIRED
Authentication token expired
DATA_CONFLICT
Change denied due to data model conflict
ENML_VALIDATION
Content of submitted note was malformed
SHARD_UNAVAILABLE
Service shard with account data is temporarily down
LEN_TOO_SHORT
Operation denied due to data model limit, where something such as a string length was too short
LEN_TOO_LONG
Operation denied due to data model limit, where something such as a string length was too long
TOO_FEW
Operation denied due to data model limit, where there were too few of something.
TOO_MANY
Operation denied due to data model limit, where there were too many of something.
UNSUPPORTED_OPERATION
Operation denied because it is currently unsupported.
TAKEN_DOWN
Operation denied because access to the corresponding object is prohibited in response to a take-down notice.
RATE_LIMIT_REACHED
Operation denied because the calling application has reached its hourly API call limit for this user.
""" UNKNOWN = 1 BAD_DATA_FORMAT = 2 PERMISSION_DENIED = 3 INTERNAL_ERROR = 4 DATA_REQUIRED = 5 LIMIT_REACHED = 6 QUOTA_REACHED = 7 INVALID_AUTH = 8 AUTH_EXPIRED = 9 DATA_CONFLICT = 10 ENML_VALIDATION = 11 SHARD_UNAVAILABLE = 12 LEN_TOO_SHORT = 13 LEN_TOO_LONG = 14 TOO_FEW = 15 TOO_MANY = 16 UNSUPPORTED_OPERATION = 17 TAKEN_DOWN = 18 RATE_LIMIT_REACHED = 19 _VALUES_TO_NAMES = { 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", 18: "TAKEN_DOWN", 19: "RATE_LIMIT_REACHED", } _NAMES_TO_VALUES = { "UNKNOWN": 1, "BAD_DATA_FORMAT": 2, "PERMISSION_DENIED": 3, "INTERNAL_ERROR": 4, "DATA_REQUIRED": 5, "LIMIT_REACHED": 6, "QUOTA_REACHED": 7, "INVALID_AUTH": 8, "AUTH_EXPIRED": 9, "DATA_CONFLICT": 10, "ENML_VALIDATION": 11, "SHARD_UNAVAILABLE": 12, "LEN_TOO_SHORT": 13, "LEN_TOO_LONG": 14, "TOO_FEW": 15, "TOO_MANY": 16, "UNSUPPORTED_OPERATION": 17, "TAKEN_DOWN": 18, "RATE_LIMIT_REACHED": 19, } class EDAMUserException(TException): """ This exception is thrown by EDAM procedures when a call fails as a result of a problem that a caller may be able to resolve. For example, if the user attempts to add a note to their account which would exceed their storage quota, this type of exception may be thrown to indicate the source of the error so that they can choose an alternate action. This exception would not be used for internal system errors that do not reflect user actions, but rather reflect a problem within the service that the user cannot resolve. errorCode: The numeric code indicating the type of error that occurred. must be one of the values of EDAMErrorCode. parameter: If the error applied to a particular input parameter, this will indicate which parameter. Attributes: - errorCode - parameter """ thrift_spec = ( None, # 0 (1, TType.I32, 'errorCode', None, None, ), # 1 (2, TType.STRING, 'parameter', None, None, ), # 2 ) def __init__(self, errorCode=None, parameter=None,): self.errorCode = errorCode self.parameter = parameter def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.errorCode = iprot.readI32(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.parameter = iprot.readString(); else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('EDAMUserException') if self.errorCode is not None: oprot.writeFieldBegin('errorCode', TType.I32, 1) oprot.writeI32(self.errorCode) oprot.writeFieldEnd() if self.parameter is not None: oprot.writeFieldBegin('parameter', TType.STRING, 2) oprot.writeString(self.parameter) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.errorCode is None: raise TProtocol.TProtocolException(message='Required field errorCode is unset!') return def __str__(self): return repr(self) def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class EDAMSystemException(TException): """ This exception is thrown by EDAM procedures when a call fails as a result of a problem in the service that could not be changed through caller action. errorCode: The numeric code indicating the type of error that occurred. must be one of the values of EDAMErrorCode. message: This may contain additional information about the error rateLimitDuration: Indicates the minimum number of seconds that an application should expect subsequent API calls for this user to fail. The application should not retry API requests for the user until at least this many seconds have passed. Present only when errorCode is RATE_LIMIT_REACHED, Attributes: - errorCode - message - rateLimitDuration """ thrift_spec = ( None, # 0 (1, TType.I32, 'errorCode', None, None, ), # 1 (2, TType.STRING, 'message', None, None, ), # 2 (3, TType.I32, 'rateLimitDuration', None, None, ), # 3 ) def __init__(self, errorCode=None, message=None, rateLimitDuration=None,): self.errorCode = errorCode self.message = message self.rateLimitDuration = rateLimitDuration def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.errorCode = iprot.readI32(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.message = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.rateLimitDuration = iprot.readI32(); else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('EDAMSystemException') if self.errorCode is not None: oprot.writeFieldBegin('errorCode', TType.I32, 1) oprot.writeI32(self.errorCode) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 2) oprot.writeString(self.message) oprot.writeFieldEnd() if self.rateLimitDuration is not None: oprot.writeFieldBegin('rateLimitDuration', TType.I32, 3) oprot.writeI32(self.rateLimitDuration) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.errorCode is None: raise TProtocol.TProtocolException(message='Required field errorCode is unset!') return def __str__(self): return repr(self) def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class EDAMNotFoundException(TException): """ This exception is thrown by EDAM procedures when a caller asks to perform an operation on an object that does not exist. This may be thrown based on an invalid primary identifier (e.g. a bad GUID), or when the caller refers to an object by another unique identifier (e.g. a User's email address). identifier: A description of the object that was not found on the server. For example, "Note.notebookGuid" when a caller attempts to create a note in a notebook that does not exist in the user's account. key: The value passed from the client in the identifier, which was not found. For example, the GUID that was not found. Attributes: - identifier - key """ thrift_spec = ( None, # 0 (1, TType.STRING, 'identifier', None, None, ), # 1 (2, TType.STRING, 'key', None, None, ), # 2 ) def __init__(self, identifier=None, key=None,): self.identifier = identifier self.key = key def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.identifier = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.key = iprot.readString(); else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('EDAMNotFoundException') if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 1) oprot.writeString(self.identifier) oprot.writeFieldEnd() if self.key is not None: oprot.writeFieldBegin('key', TType.STRING, 2) oprot.writeString(self.key) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __str__(self): return repr(self) def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) ================================================ FILE: lib/evernote/edam/limits/__init__.py ================================================ __all__ = ['ttypes', 'constants'] ================================================ FILE: lib/evernote/edam/limits/constants.py ================================================ # # Autogenerated by Thrift Compiler # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * EDAM_ATTRIBUTE_LEN_MIN = 1 EDAM_ATTRIBUTE_LEN_MAX = 4096 EDAM_ATTRIBUTE_REGEX = "^[^\\p{Cc}\\p{Zl}\\p{Zp}]{1,4096}$" EDAM_ATTRIBUTE_LIST_MAX = 100 EDAM_ATTRIBUTE_MAP_MAX = 100 EDAM_GUID_LEN_MIN = 36 EDAM_GUID_LEN_MAX = 36 EDAM_GUID_REGEX = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" EDAM_EMAIL_LEN_MIN = 6 EDAM_EMAIL_LEN_MAX = 255 EDAM_EMAIL_LOCAL_REGEX = "^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*$" EDAM_EMAIL_DOMAIN_REGEX = "^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.([A-Za-z]{2,})$" EDAM_EMAIL_REGEX = "^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.([A-Za-z]{2,})$" EDAM_VAT_REGEX = "^((AT)?U[0-9]{8}|(BE)?0?[0-9]{9}|(BG)?[0-9]{9,10}|(CY)?[0-9]{8}L|(CZ)?[0-9]{8,10}|(DE)?[0-9]{9}|(DK)?[0-9]{8}|(EE)?[0-9]{9}|(EL|GR)?[0-9]{9}|(ES)?[0-9A-Z][0-9]{7}[0-9A-Z]|(FI)?[0-9]{8}|(FR)?[0-9A-Z]{2}[0-9]{9}|(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})|(HU)?[0-9]{8}|(IE)?[0-9]S[0-9]{5}L|(IT)?[0-9]{11}|(LT)?([0-9]{9}|[0-9]{12})|(LU)?[0-9]{8}|(LV)?[0-9]{11}|(MT)?[0-9]{8}|(NL)?[0-9]{9}B[0-9]{2}|(PL)?[0-9]{10}|(PT)?[0-9]{9}|(RO)?[0-9]{2,10}|(SE)?[0-9]{12}|(SI)?[0-9]{8}|(SK)?[0-9]{10})|[0-9]{9}MVA|[0-9]{6}|CHE[0-9]{9}(TVA|MWST|IVA)$" EDAM_TIMEZONE_LEN_MIN = 1 EDAM_TIMEZONE_LEN_MAX = 32 EDAM_TIMEZONE_REGEX = "^([A-Za-z_-]+(/[A-Za-z_-]+)*)|(GMT(-|\\+)[0-9]{1,2}(:[0-9]{2})?)$" EDAM_MIME_LEN_MIN = 3 EDAM_MIME_LEN_MAX = 255 EDAM_MIME_REGEX = "^[A-Za-z]+/[A-Za-z0-9._+-]+$" EDAM_MIME_TYPE_GIF = "image/gif" EDAM_MIME_TYPE_JPEG = "image/jpeg" EDAM_MIME_TYPE_PNG = "image/png" EDAM_MIME_TYPE_WAV = "audio/wav" EDAM_MIME_TYPE_MP3 = "audio/mpeg" EDAM_MIME_TYPE_AMR = "audio/amr" EDAM_MIME_TYPE_AAC = "audio/aac" EDAM_MIME_TYPE_M4A = "audio/mp4" EDAM_MIME_TYPE_MP4_VIDEO = "video/mp4" EDAM_MIME_TYPE_INK = "application/vnd.evernote.ink" EDAM_MIME_TYPE_PDF = "application/pdf" EDAM_MIME_TYPE_DEFAULT = "application/octet-stream" EDAM_MIME_TYPES = set([ "image/gif", "image/jpeg", "image/png", "audio/wav", "audio/mpeg", "audio/amr", "application/vnd.evernote.ink", "application/pdf", "video/mp4", "audio/aac", "audio/mp4", ]) EDAM_INDEXABLE_RESOURCE_MIME_TYPES = set([ "application/msword", "application/mspowerpoint", "application/excel", "application/vnd.ms-word", "application/vnd.ms-powerpoint", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.apple.pages", "application/vnd.apple.numbers", "application/vnd.apple.keynote", "application/x-iwork-pages-sffpages", "application/x-iwork-numbers-sffnumbers", "application/x-iwork-keynote-sffkey", ]) EDAM_SEARCH_QUERY_LEN_MIN = 0 EDAM_SEARCH_QUERY_LEN_MAX = 1024 EDAM_SEARCH_QUERY_REGEX = "^[^\\p{Cc}\\p{Zl}\\p{Zp}]{0,1024}$" EDAM_HASH_LEN = 16 EDAM_USER_USERNAME_LEN_MIN = 1 EDAM_USER_USERNAME_LEN_MAX = 64 EDAM_USER_USERNAME_REGEX = "^[a-z0-9]([a-z0-9_-]{0,62}[a-z0-9])?$" EDAM_USER_NAME_LEN_MIN = 1 EDAM_USER_NAME_LEN_MAX = 255 EDAM_USER_NAME_REGEX = "^[^\\p{Cc}\\p{Zl}\\p{Zp}]{1,255}$" EDAM_TAG_NAME_LEN_MIN = 1 EDAM_TAG_NAME_LEN_MAX = 100 EDAM_TAG_NAME_REGEX = "^[^,\\p{Cc}\\p{Z}]([^,\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^,\\p{Cc}\\p{Z}])?$" EDAM_NOTE_TITLE_LEN_MIN = 1 EDAM_NOTE_TITLE_LEN_MAX = 255 EDAM_NOTE_TITLE_REGEX = "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,253}[^\\p{Cc}\\p{Z}])?$" EDAM_NOTE_CONTENT_LEN_MIN = 0 EDAM_NOTE_CONTENT_LEN_MAX = 5242880 EDAM_APPLICATIONDATA_NAME_LEN_MIN = 3 EDAM_APPLICATIONDATA_NAME_LEN_MAX = 32 EDAM_APPLICATIONDATA_VALUE_LEN_MIN = 0 EDAM_APPLICATIONDATA_VALUE_LEN_MAX = 4092 EDAM_APPLICATIONDATA_ENTRY_LEN_MAX = 4095 EDAM_APPLICATIONDATA_NAME_REGEX = "^[A-Za-z0-9_.-]{3,32}$" EDAM_APPLICATIONDATA_VALUE_REGEX = "^[^\\p{Cc}]{0,4092}$" EDAM_NOTEBOOK_NAME_LEN_MIN = 1 EDAM_NOTEBOOK_NAME_LEN_MAX = 100 EDAM_NOTEBOOK_NAME_REGEX = "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$" EDAM_NOTEBOOK_STACK_LEN_MIN = 1 EDAM_NOTEBOOK_STACK_LEN_MAX = 100 EDAM_NOTEBOOK_STACK_REGEX = "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$" EDAM_PUBLISHING_URI_LEN_MIN = 1 EDAM_PUBLISHING_URI_LEN_MAX = 255 EDAM_PUBLISHING_URI_REGEX = "^[a-zA-Z0-9.~_+-]{1,255}$" EDAM_PUBLISHING_URI_PROHIBITED = set([ "..", ]) EDAM_PUBLISHING_DESCRIPTION_LEN_MIN = 1 EDAM_PUBLISHING_DESCRIPTION_LEN_MAX = 200 EDAM_PUBLISHING_DESCRIPTION_REGEX = "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,198}[^\\p{Cc}\\p{Z}])?$" EDAM_SAVED_SEARCH_NAME_LEN_MIN = 1 EDAM_SAVED_SEARCH_NAME_LEN_MAX = 100 EDAM_SAVED_SEARCH_NAME_REGEX = "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$" EDAM_USER_PASSWORD_LEN_MIN = 6 EDAM_USER_PASSWORD_LEN_MAX = 64 EDAM_USER_PASSWORD_REGEX = "^[A-Za-z0-9!#$%&'()*+,./:;<=>?@^_`{|}~\\[\\]\\\\-]{6,64}$" EDAM_BUSINESS_URI_LEN_MAX = 32 EDAM_NOTE_TAGS_MAX = 100 EDAM_NOTE_RESOURCES_MAX = 1000 EDAM_USER_TAGS_MAX = 100000 EDAM_BUSINESS_TAGS_MAX = 100000 EDAM_USER_SAVED_SEARCHES_MAX = 100 EDAM_USER_NOTES_MAX = 100000 EDAM_BUSINESS_NOTES_MAX = 500000 EDAM_USER_NOTEBOOKS_MAX = 250 EDAM_BUSINESS_NOTEBOOKS_MAX = 5000 EDAM_USER_RECENT_MAILED_ADDRESSES_MAX = 10 EDAM_USER_MAIL_LIMIT_DAILY_FREE = 50 EDAM_USER_MAIL_LIMIT_DAILY_PREMIUM = 200 EDAM_USER_UPLOAD_LIMIT_FREE = 62914560 EDAM_USER_UPLOAD_LIMIT_PREMIUM = 1073741824 EDAM_USER_UPLOAD_LIMIT_BUSINESS = 2147483647 EDAM_NOTE_SIZE_MAX_FREE = 26214400 EDAM_NOTE_SIZE_MAX_PREMIUM = 104857600 EDAM_RESOURCE_SIZE_MAX_FREE = 26214400 EDAM_RESOURCE_SIZE_MAX_PREMIUM = 104857600 EDAM_USER_LINKED_NOTEBOOK_MAX = 100 EDAM_USER_LINKED_NOTEBOOK_MAX_PREMIUM = 250 EDAM_NOTEBOOK_SHARED_NOTEBOOK_MAX = 250 EDAM_NOTE_CONTENT_CLASS_LEN_MIN = 3 EDAM_NOTE_CONTENT_CLASS_LEN_MAX = 32 EDAM_NOTE_CONTENT_CLASS_REGEX = "^[A-Za-z0-9_.-]{3,32}$" EDAM_HELLO_APP_CONTENT_CLASS_PREFIX = "evernote.hello." EDAM_FOOD_APP_CONTENT_CLASS_PREFIX = "evernote.food." EDAM_CONTENT_CLASS_HELLO_ENCOUNTER = "evernote.hello.encounter" EDAM_CONTENT_CLASS_HELLO_PROFILE = "evernote.hello.profile" EDAM_CONTENT_CLASS_FOOD_MEAL = "evernote.food.meal" EDAM_CONTENT_CLASS_SKITCH_PREFIX = "evernote.skitch" EDAM_CONTENT_CLASS_SKITCH = "evernote.skitch" EDAM_CONTENT_CLASS_SKITCH_PDF = "evernote.skitch.pdf" EDAM_CONTENT_CLASS_PENULTIMATE_PREFIX = "evernote.penultimate." EDAM_CONTENT_CLASS_PENULTIMATE_NOTEBOOK = "evernote.penultimate.notebook" 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 EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MIN = 1 EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MAX = 200 EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_REGEX = "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,198}[^\\p{Cc}\\p{Z}])?$" EDAM_BUSINESS_PHONE_NUMBER_LEN_MAX = 20 EDAM_PREFERENCE_NAME_LEN_MIN = 3 EDAM_PREFERENCE_NAME_LEN_MAX = 32 EDAM_PREFERENCE_VALUE_LEN_MIN = 1 EDAM_PREFERENCE_VALUE_LEN_MAX = 1024 EDAM_MAX_PREFERENCES = 100 EDAM_MAX_VALUES_PER_PREFERENCE = 256 EDAM_PREFERENCE_NAME_REGEX = "^[A-Za-z0-9_.-]{3,32}$" EDAM_PREFERENCE_VALUE_REGEX = "^[^\\p{Cc}]{1,1024}$" EDAM_PREFERENCE_SHORTCUTS = "evernote.shortcuts" EDAM_PREFERENCE_SHORTCUTS_MAX_VALUES = 250 EDAM_DEVICE_ID_LEN_MAX = 32 EDAM_DEVICE_ID_REGEX = "^[^\\p{Cc}]{1,32}$" EDAM_DEVICE_DESCRIPTION_LEN_MAX = 64 EDAM_DEVICE_DESCRIPTION_REGEX = "^[^\\p{Cc}]{1,64}$" EDAM_SEARCH_SUGGESTIONS_MAX = 10 EDAM_SEARCH_SUGGESTIONS_PREFIX_LEN_MAX = 1024 EDAM_SEARCH_SUGGESTIONS_PREFIX_LEN_MIN = 2 ================================================ FILE: lib/evernote/edam/limits/ttypes.py ================================================ # # Autogenerated by Thrift Compiler # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: fastbinary = None ================================================ FILE: lib/evernote/edam/notestore/NoteStore-remote ================================================ #!/usr/bin/env python # # Autogenerated by Thrift Compiler # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # import sys import pprint from urlparse import urlparse from thrift.transport import TTransport from thrift.transport import TSocket from thrift.transport import THttpClient from thrift.protocol import TBinaryProtocol import NoteStore from ttypes import * if len(sys.argv) <= 1 or sys.argv[1] == '--help': print '' print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' print ' SyncState getSyncState(string authenticationToken)' print ' SyncState getSyncStateWithMetrics(string authenticationToken, ClientUsageMetrics clientMetrics)' print ' SyncChunk getSyncChunk(string authenticationToken, i32 afterUSN, i32 maxEntries, bool fullSyncOnly)' print ' SyncChunk getFilteredSyncChunk(string authenticationToken, i32 afterUSN, i32 maxEntries, SyncChunkFilter filter)' print ' SyncState getLinkedNotebookSyncState(string authenticationToken, LinkedNotebook linkedNotebook)' print ' SyncChunk getLinkedNotebookSyncChunk(string authenticationToken, LinkedNotebook linkedNotebook, i32 afterUSN, i32 maxEntries, bool fullSyncOnly)' print ' listNotebooks(string authenticationToken)' print ' Notebook getNotebook(string authenticationToken, Guid guid)' print ' Notebook getDefaultNotebook(string authenticationToken)' print ' Notebook createNotebook(string authenticationToken, Notebook notebook)' print ' i32 updateNotebook(string authenticationToken, Notebook notebook)' print ' i32 expungeNotebook(string authenticationToken, Guid guid)' print ' listTags(string authenticationToken)' print ' listTagsByNotebook(string authenticationToken, Guid notebookGuid)' print ' Tag getTag(string authenticationToken, Guid guid)' print ' Tag createTag(string authenticationToken, Tag tag)' print ' i32 updateTag(string authenticationToken, Tag tag)' print ' void untagAll(string authenticationToken, Guid guid)' print ' i32 expungeTag(string authenticationToken, Guid guid)' print ' listSearches(string authenticationToken)' print ' SavedSearch getSearch(string authenticationToken, Guid guid)' print ' SavedSearch createSearch(string authenticationToken, SavedSearch search)' print ' i32 updateSearch(string authenticationToken, SavedSearch search)' print ' i32 expungeSearch(string authenticationToken, Guid guid)' print ' NoteList findNotes(string authenticationToken, NoteFilter filter, i32 offset, i32 maxNotes)' print ' i32 findNoteOffset(string authenticationToken, NoteFilter filter, Guid guid)' print ' NotesMetadataList findNotesMetadata(string authenticationToken, NoteFilter filter, i32 offset, i32 maxNotes, NotesMetadataResultSpec resultSpec)' print ' NoteCollectionCounts findNoteCounts(string authenticationToken, NoteFilter filter, bool withTrash)' print ' Note getNote(string authenticationToken, Guid guid, bool withContent, bool withResourcesData, bool withResourcesRecognition, bool withResourcesAlternateData)' print ' LazyMap getNoteApplicationData(string authenticationToken, Guid guid)' print ' string getNoteApplicationDataEntry(string authenticationToken, Guid guid, string key)' print ' i32 setNoteApplicationDataEntry(string authenticationToken, Guid guid, string key, string value)' print ' i32 unsetNoteApplicationDataEntry(string authenticationToken, Guid guid, string key)' print ' string getNoteContent(string authenticationToken, Guid guid)' print ' string getNoteSearchText(string authenticationToken, Guid guid, bool noteOnly, bool tokenizeForIndexing)' print ' string getResourceSearchText(string authenticationToken, Guid guid)' print ' getNoteTagNames(string authenticationToken, Guid guid)' print ' Note createNote(string authenticationToken, Note note)' print ' Note updateNote(string authenticationToken, Note note)' print ' i32 deleteNote(string authenticationToken, Guid guid)' print ' i32 expungeNote(string authenticationToken, Guid guid)' print ' i32 expungeNotes(string authenticationToken, noteGuids)' print ' i32 expungeInactiveNotes(string authenticationToken)' print ' Note copyNote(string authenticationToken, Guid noteGuid, Guid toNotebookGuid)' print ' listNoteVersions(string authenticationToken, Guid noteGuid)' print ' Note getNoteVersion(string authenticationToken, Guid noteGuid, i32 updateSequenceNum, bool withResourcesData, bool withResourcesRecognition, bool withResourcesAlternateData)' print ' Resource getResource(string authenticationToken, Guid guid, bool withData, bool withRecognition, bool withAttributes, bool withAlternateData)' print ' LazyMap getResourceApplicationData(string authenticationToken, Guid guid)' print ' string getResourceApplicationDataEntry(string authenticationToken, Guid guid, string key)' print ' i32 setResourceApplicationDataEntry(string authenticationToken, Guid guid, string key, string value)' print ' i32 unsetResourceApplicationDataEntry(string authenticationToken, Guid guid, string key)' print ' i32 updateResource(string authenticationToken, Resource resource)' print ' string getResourceData(string authenticationToken, Guid guid)' print ' Resource getResourceByHash(string authenticationToken, Guid noteGuid, string contentHash, bool withData, bool withRecognition, bool withAlternateData)' print ' string getResourceRecognition(string authenticationToken, Guid guid)' print ' string getResourceAlternateData(string authenticationToken, Guid guid)' print ' ResourceAttributes getResourceAttributes(string authenticationToken, Guid guid)' print ' Notebook getPublicNotebook(UserID userId, string publicUri)' print ' SharedNotebook createSharedNotebook(string authenticationToken, SharedNotebook sharedNotebook)' print ' i32 updateSharedNotebook(string authenticationToken, SharedNotebook sharedNotebook)' print ' i32 setSharedNotebookRecipientSettings(string authenticationToken, i64 sharedNotebookId, SharedNotebookRecipientSettings recipientSettings)' print ' i32 sendMessageToSharedNotebookMembers(string authenticationToken, Guid notebookGuid, string messageText, recipients)' print ' listSharedNotebooks(string authenticationToken)' print ' i32 expungeSharedNotebooks(string authenticationToken, sharedNotebookIds)' print ' LinkedNotebook createLinkedNotebook(string authenticationToken, LinkedNotebook linkedNotebook)' print ' i32 updateLinkedNotebook(string authenticationToken, LinkedNotebook linkedNotebook)' print ' listLinkedNotebooks(string authenticationToken)' print ' i32 expungeLinkedNotebook(string authenticationToken, Guid guid)' print ' AuthenticationResult authenticateToSharedNotebook(string shareKey, string authenticationToken)' print ' SharedNotebook getSharedNotebookByAuth(string authenticationToken)' print ' void emailNote(string authenticationToken, NoteEmailParameters parameters)' print ' string shareNote(string authenticationToken, Guid guid)' print ' void stopSharingNote(string authenticationToken, Guid guid)' print ' AuthenticationResult authenticateToSharedNote(string guid, string noteKey, string authenticationToken)' print ' RelatedResult findRelated(string authenticationToken, RelatedQuery query, RelatedResultSpec resultSpec)' print '' sys.exit(0) pp = pprint.PrettyPrinter(indent = 2) host = 'localhost' port = 9090 uri = '' framed = False http = False argi = 1 if sys.argv[argi] == '-h': parts = sys.argv[argi+1].split(':') host = parts[0] if len(parts) > 1: port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': url = urlparse(sys.argv[argi+1]) parts = url[1].split(':') host = parts[0] if len(parts) > 1: port = int(parts[1]) else: port = 80 uri = url[2] if url[4]: uri += '?%s' % url[4] http = True argi += 2 if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': framed = True argi += 1 cmd = sys.argv[argi] args = sys.argv[argi+1:] if http: transport = THttpClient.THttpClient(host, port, uri) else: socket = TSocket.TSocket(host, port) if framed: transport = TTransport.TFramedTransport(socket) else: transport = TTransport.TBufferedTransport(socket) protocol = TBinaryProtocol.TBinaryProtocol(transport) client = NoteStore.Client(protocol) transport.open() if cmd == 'getSyncState': if len(args) != 1: print 'getSyncState requires 1 args' sys.exit(1) pp.pprint(client.getSyncState(args[0],)) elif cmd == 'getSyncStateWithMetrics': if len(args) != 2: print 'getSyncStateWithMetrics requires 2 args' sys.exit(1) pp.pprint(client.getSyncStateWithMetrics(args[0],eval(args[1]),)) elif cmd == 'getSyncChunk': if len(args) != 4: print 'getSyncChunk requires 4 args' sys.exit(1) pp.pprint(client.getSyncChunk(args[0],eval(args[1]),eval(args[2]),eval(args[3]),)) elif cmd == 'getFilteredSyncChunk': if len(args) != 4: print 'getFilteredSyncChunk requires 4 args' sys.exit(1) pp.pprint(client.getFilteredSyncChunk(args[0],eval(args[1]),eval(args[2]),eval(args[3]),)) elif cmd == 'getLinkedNotebookSyncState': if len(args) != 2: print 'getLinkedNotebookSyncState requires 2 args' sys.exit(1) pp.pprint(client.getLinkedNotebookSyncState(args[0],eval(args[1]),)) elif cmd == 'getLinkedNotebookSyncChunk': if len(args) != 5: print 'getLinkedNotebookSyncChunk requires 5 args' sys.exit(1) pp.pprint(client.getLinkedNotebookSyncChunk(args[0],eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) elif cmd == 'listNotebooks': if len(args) != 1: print 'listNotebooks requires 1 args' sys.exit(1) pp.pprint(client.listNotebooks(args[0],)) elif cmd == 'getNotebook': if len(args) != 2: print 'getNotebook requires 2 args' sys.exit(1) pp.pprint(client.getNotebook(args[0],eval(args[1]),)) elif cmd == 'getDefaultNotebook': if len(args) != 1: print 'getDefaultNotebook requires 1 args' sys.exit(1) pp.pprint(client.getDefaultNotebook(args[0],)) elif cmd == 'createNotebook': if len(args) != 2: print 'createNotebook requires 2 args' sys.exit(1) pp.pprint(client.createNotebook(args[0],eval(args[1]),)) elif cmd == 'updateNotebook': if len(args) != 2: print 'updateNotebook requires 2 args' sys.exit(1) pp.pprint(client.updateNotebook(args[0],eval(args[1]),)) elif cmd == 'expungeNotebook': if len(args) != 2: print 'expungeNotebook requires 2 args' sys.exit(1) pp.pprint(client.expungeNotebook(args[0],eval(args[1]),)) elif cmd == 'listTags': if len(args) != 1: print 'listTags requires 1 args' sys.exit(1) pp.pprint(client.listTags(args[0],)) elif cmd == 'listTagsByNotebook': if len(args) != 2: print 'listTagsByNotebook requires 2 args' sys.exit(1) pp.pprint(client.listTagsByNotebook(args[0],eval(args[1]),)) elif cmd == 'getTag': if len(args) != 2: print 'getTag requires 2 args' sys.exit(1) pp.pprint(client.getTag(args[0],eval(args[1]),)) elif cmd == 'createTag': if len(args) != 2: print 'createTag requires 2 args' sys.exit(1) pp.pprint(client.createTag(args[0],eval(args[1]),)) elif cmd == 'updateTag': if len(args) != 2: print 'updateTag requires 2 args' sys.exit(1) pp.pprint(client.updateTag(args[0],eval(args[1]),)) elif cmd == 'untagAll': if len(args) != 2: print 'untagAll requires 2 args' sys.exit(1) pp.pprint(client.untagAll(args[0],eval(args[1]),)) elif cmd == 'expungeTag': if len(args) != 2: print 'expungeTag requires 2 args' sys.exit(1) pp.pprint(client.expungeTag(args[0],eval(args[1]),)) elif cmd == 'listSearches': if len(args) != 1: print 'listSearches requires 1 args' sys.exit(1) pp.pprint(client.listSearches(args[0],)) elif cmd == 'getSearch': if len(args) != 2: print 'getSearch requires 2 args' sys.exit(1) pp.pprint(client.getSearch(args[0],eval(args[1]),)) elif cmd == 'createSearch': if len(args) != 2: print 'createSearch requires 2 args' sys.exit(1) pp.pprint(client.createSearch(args[0],eval(args[1]),)) elif cmd == 'updateSearch': if len(args) != 2: print 'updateSearch requires 2 args' sys.exit(1) pp.pprint(client.updateSearch(args[0],eval(args[1]),)) elif cmd == 'expungeSearch': if len(args) != 2: print 'expungeSearch requires 2 args' sys.exit(1) pp.pprint(client.expungeSearch(args[0],eval(args[1]),)) elif cmd == 'findNotes': if len(args) != 4: print 'findNotes requires 4 args' sys.exit(1) pp.pprint(client.findNotes(args[0],eval(args[1]),eval(args[2]),eval(args[3]),)) elif cmd == 'findNoteOffset': if len(args) != 3: print 'findNoteOffset requires 3 args' sys.exit(1) pp.pprint(client.findNoteOffset(args[0],eval(args[1]),eval(args[2]),)) elif cmd == 'findNotesMetadata': if len(args) != 5: print 'findNotesMetadata requires 5 args' sys.exit(1) pp.pprint(client.findNotesMetadata(args[0],eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) elif cmd == 'findNoteCounts': if len(args) != 3: print 'findNoteCounts requires 3 args' sys.exit(1) pp.pprint(client.findNoteCounts(args[0],eval(args[1]),eval(args[2]),)) elif cmd == 'getNote': if len(args) != 6: print 'getNote requires 6 args' sys.exit(1) pp.pprint(client.getNote(args[0],eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),)) elif cmd == 'getNoteApplicationData': if len(args) != 2: print 'getNoteApplicationData requires 2 args' sys.exit(1) pp.pprint(client.getNoteApplicationData(args[0],eval(args[1]),)) elif cmd == 'getNoteApplicationDataEntry': if len(args) != 3: print 'getNoteApplicationDataEntry requires 3 args' sys.exit(1) pp.pprint(client.getNoteApplicationDataEntry(args[0],eval(args[1]),args[2],)) elif cmd == 'setNoteApplicationDataEntry': if len(args) != 4: print 'setNoteApplicationDataEntry requires 4 args' sys.exit(1) pp.pprint(client.setNoteApplicationDataEntry(args[0],eval(args[1]),args[2],args[3],)) elif cmd == 'unsetNoteApplicationDataEntry': if len(args) != 3: print 'unsetNoteApplicationDataEntry requires 3 args' sys.exit(1) pp.pprint(client.unsetNoteApplicationDataEntry(args[0],eval(args[1]),args[2],)) elif cmd == 'getNoteContent': if len(args) != 2: print 'getNoteContent requires 2 args' sys.exit(1) pp.pprint(client.getNoteContent(args[0],eval(args[1]),)) elif cmd == 'getNoteSearchText': if len(args) != 4: print 'getNoteSearchText requires 4 args' sys.exit(1) pp.pprint(client.getNoteSearchText(args[0],eval(args[1]),eval(args[2]),eval(args[3]),)) elif cmd == 'getResourceSearchText': if len(args) != 2: print 'getResourceSearchText requires 2 args' sys.exit(1) pp.pprint(client.getResourceSearchText(args[0],eval(args[1]),)) elif cmd == 'getNoteTagNames': if len(args) != 2: print 'getNoteTagNames requires 2 args' sys.exit(1) pp.pprint(client.getNoteTagNames(args[0],eval(args[1]),)) elif cmd == 'createNote': if len(args) != 2: print 'createNote requires 2 args' sys.exit(1) pp.pprint(client.createNote(args[0],eval(args[1]),)) elif cmd == 'updateNote': if len(args) != 2: print 'updateNote requires 2 args' sys.exit(1) pp.pprint(client.updateNote(args[0],eval(args[1]),)) elif cmd == 'deleteNote': if len(args) != 2: print 'deleteNote requires 2 args' sys.exit(1) pp.pprint(client.deleteNote(args[0],eval(args[1]),)) elif cmd == 'expungeNote': if len(args) != 2: print 'expungeNote requires 2 args' sys.exit(1) pp.pprint(client.expungeNote(args[0],eval(args[1]),)) elif cmd == 'expungeNotes': if len(args) != 2: print 'expungeNotes requires 2 args' sys.exit(1) pp.pprint(client.expungeNotes(args[0],eval(args[1]),)) elif cmd == 'expungeInactiveNotes': if len(args) != 1: print 'expungeInactiveNotes requires 1 args' sys.exit(1) pp.pprint(client.expungeInactiveNotes(args[0],)) elif cmd == 'copyNote': if len(args) != 3: print 'copyNote requires 3 args' sys.exit(1) pp.pprint(client.copyNote(args[0],eval(args[1]),eval(args[2]),)) elif cmd == 'listNoteVersions': if len(args) != 2: print 'listNoteVersions requires 2 args' sys.exit(1) pp.pprint(client.listNoteVersions(args[0],eval(args[1]),)) elif cmd == 'getNoteVersion': if len(args) != 6: print 'getNoteVersion requires 6 args' sys.exit(1) pp.pprint(client.getNoteVersion(args[0],eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),)) elif cmd == 'getResource': if len(args) != 6: print 'getResource requires 6 args' sys.exit(1) pp.pprint(client.getResource(args[0],eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),)) elif cmd == 'getResourceApplicationData': if len(args) != 2: print 'getResourceApplicationData requires 2 args' sys.exit(1) pp.pprint(client.getResourceApplicationData(args[0],eval(args[1]),)) elif cmd == 'getResourceApplicationDataEntry': if len(args) != 3: print 'getResourceApplicationDataEntry requires 3 args' sys.exit(1) pp.pprint(client.getResourceApplicationDataEntry(args[0],eval(args[1]),args[2],)) elif cmd == 'setResourceApplicationDataEntry': if len(args) != 4: print 'setResourceApplicationDataEntry requires 4 args' sys.exit(1) pp.pprint(client.setResourceApplicationDataEntry(args[0],eval(args[1]),args[2],args[3],)) elif cmd == 'unsetResourceApplicationDataEntry': if len(args) != 3: print 'unsetResourceApplicationDataEntry requires 3 args' sys.exit(1) pp.pprint(client.unsetResourceApplicationDataEntry(args[0],eval(args[1]),args[2],)) elif cmd == 'updateResource': if len(args) != 2: print 'updateResource requires 2 args' sys.exit(1) pp.pprint(client.updateResource(args[0],eval(args[1]),)) elif cmd == 'getResourceData': if len(args) != 2: print 'getResourceData requires 2 args' sys.exit(1) pp.pprint(client.getResourceData(args[0],eval(args[1]),)) elif cmd == 'getResourceByHash': if len(args) != 6: print 'getResourceByHash requires 6 args' sys.exit(1) pp.pprint(client.getResourceByHash(args[0],eval(args[1]),args[2],eval(args[3]),eval(args[4]),eval(args[5]),)) elif cmd == 'getResourceRecognition': if len(args) != 2: print 'getResourceRecognition requires 2 args' sys.exit(1) pp.pprint(client.getResourceRecognition(args[0],eval(args[1]),)) elif cmd == 'getResourceAlternateData': if len(args) != 2: print 'getResourceAlternateData requires 2 args' sys.exit(1) pp.pprint(client.getResourceAlternateData(args[0],eval(args[1]),)) elif cmd == 'getResourceAttributes': if len(args) != 2: print 'getResourceAttributes requires 2 args' sys.exit(1) pp.pprint(client.getResourceAttributes(args[0],eval(args[1]),)) elif cmd == 'getPublicNotebook': if len(args) != 2: print 'getPublicNotebook requires 2 args' sys.exit(1) pp.pprint(client.getPublicNotebook(eval(args[0]),args[1],)) elif cmd == 'createSharedNotebook': if len(args) != 2: print 'createSharedNotebook requires 2 args' sys.exit(1) pp.pprint(client.createSharedNotebook(args[0],eval(args[1]),)) elif cmd == 'updateSharedNotebook': if len(args) != 2: print 'updateSharedNotebook requires 2 args' sys.exit(1) pp.pprint(client.updateSharedNotebook(args[0],eval(args[1]),)) elif cmd == 'setSharedNotebookRecipientSettings': if len(args) != 3: print 'setSharedNotebookRecipientSettings requires 3 args' sys.exit(1) pp.pprint(client.setSharedNotebookRecipientSettings(args[0],eval(args[1]),eval(args[2]),)) elif cmd == 'sendMessageToSharedNotebookMembers': if len(args) != 4: print 'sendMessageToSharedNotebookMembers requires 4 args' sys.exit(1) pp.pprint(client.sendMessageToSharedNotebookMembers(args[0],eval(args[1]),args[2],eval(args[3]),)) elif cmd == 'listSharedNotebooks': if len(args) != 1: print 'listSharedNotebooks requires 1 args' sys.exit(1) pp.pprint(client.listSharedNotebooks(args[0],)) elif cmd == 'expungeSharedNotebooks': if len(args) != 2: print 'expungeSharedNotebooks requires 2 args' sys.exit(1) pp.pprint(client.expungeSharedNotebooks(args[0],eval(args[1]),)) elif cmd == 'createLinkedNotebook': if len(args) != 2: print 'createLinkedNotebook requires 2 args' sys.exit(1) pp.pprint(client.createLinkedNotebook(args[0],eval(args[1]),)) elif cmd == 'updateLinkedNotebook': if len(args) != 2: print 'updateLinkedNotebook requires 2 args' sys.exit(1) pp.pprint(client.updateLinkedNotebook(args[0],eval(args[1]),)) elif cmd == 'listLinkedNotebooks': if len(args) != 1: print 'listLinkedNotebooks requires 1 args' sys.exit(1) pp.pprint(client.listLinkedNotebooks(args[0],)) elif cmd == 'expungeLinkedNotebook': if len(args) != 2: print 'expungeLinkedNotebook requires 2 args' sys.exit(1) pp.pprint(client.expungeLinkedNotebook(args[0],eval(args[1]),)) elif cmd == 'authenticateToSharedNotebook': if len(args) != 2: print 'authenticateToSharedNotebook requires 2 args' sys.exit(1) pp.pprint(client.authenticateToSharedNotebook(args[0],args[1],)) elif cmd == 'getSharedNotebookByAuth': if len(args) != 1: print 'getSharedNotebookByAuth requires 1 args' sys.exit(1) pp.pprint(client.getSharedNotebookByAuth(args[0],)) elif cmd == 'emailNote': if len(args) != 2: print 'emailNote requires 2 args' sys.exit(1) pp.pprint(client.emailNote(args[0],eval(args[1]),)) elif cmd == 'shareNote': if len(args) != 2: print 'shareNote requires 2 args' sys.exit(1) pp.pprint(client.shareNote(args[0],eval(args[1]),)) elif cmd == 'stopSharingNote': if len(args) != 2: print 'stopSharingNote requires 2 args' sys.exit(1) pp.pprint(client.stopSharingNote(args[0],eval(args[1]),)) elif cmd == 'authenticateToSharedNote': if len(args) != 3: print 'authenticateToSharedNote requires 3 args' sys.exit(1) pp.pprint(client.authenticateToSharedNote(args[0],args[1],args[2],)) elif cmd == 'findRelated': if len(args) != 3: print 'findRelated requires 3 args' sys.exit(1) pp.pprint(client.findRelated(args[0],eval(args[1]),eval(args[2]),)) else: print 'Unrecognized method %s' % cmd sys.exit(1) transport.close() ================================================ FILE: lib/evernote/edam/notestore/NoteStore.py ================================================ # # Autogenerated by Thrift Compiler # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: fastbinary = None class Iface(object): def getSyncState(self, authenticationToken): """ Asks the NoteStore to provide information about the status of the user account corresponding to the provided authentication token. Parameters: - authenticationToken """ pass def getSyncStateWithMetrics(self, authenticationToken, clientMetrics): """ Asks the NoteStore to provide information about the status of the user account corresponding to the provided authentication token. This version of 'getSyncState' allows the client to upload coarse- grained usage metrics to the service. @param clientMetrics see the documentation of the ClientUsageMetrics structure for an explanation of the fields that clients can pass to the service. Parameters: - authenticationToken - clientMetrics """ pass def getSyncChunk(self, authenticationToken, afterUSN, maxEntries, fullSyncOnly): """ DEPRECATED - use getFilteredSyncChunk. Parameters: - authenticationToken - afterUSN - maxEntries - fullSyncOnly """ pass def getFilteredSyncChunk(self, authenticationToken, afterUSN, maxEntries, filter): """ Asks the NoteStore to provide the state of the account in order of last modification. This request retrieves one block of the server's state so that a client can make several small requests against a large account rather than getting the entire state in one big message. This call gives fine-grained control of the data that will be received by a client by omitting data elements that a client doesn't need. This may reduce network traffic and sync times. @param afterUSN The client can pass this value to ask only for objects that have been updated after a certain point. This allows the client to receive updates after its last checkpoint rather than doing a full synchronization on every pass. The default value of "0" indicates that the client wants to get objects from the start of the account. @param maxEntries The maximum number of modified objects that should be returned in the result SyncChunk. This can be used to limit the size of each individual message to be friendly for network transfer. @param filter The caller must set some of the flags in this structure to specify which data types should be returned during the synchronization. See the SyncChunkFilter structure for information on each flag. @throws EDAMUserException Parameters: - authenticationToken - afterUSN - maxEntries - filter """ pass def getLinkedNotebookSyncState(self, authenticationToken, linkedNotebook): """ Asks the NoteStore to provide information about the status of a linked notebook that has been shared with the caller, or that is public to the world. This will return a result that is similar to getSyncState, but may omit SyncState.uploaded if the caller doesn't have permission to write to the linked notebook. This function must be called on the shard that owns the referenced notebook. (I.e. the shardId in /shard/shardId/edam/note must be the same as LinkedNotebook.shardId.) @param authenticationToken This should be an authenticationToken for the guest who has received the invitation to the share. (I.e. this should not be the result of NoteStore.authenticateToSharedNotebook) @param linkedNotebook This structure should contain identifying information and permissions to access the notebook in question. Parameters: - authenticationToken - linkedNotebook """ pass def getLinkedNotebookSyncChunk(self, authenticationToken, linkedNotebook, afterUSN, maxEntries, fullSyncOnly): """ Asks the NoteStore to provide information about the contents of a linked notebook that has been shared with the caller, or that is public to the world. This will return a result that is similar to getSyncChunk, but will only contain entries that are visible to the caller. I.e. only that particular Notebook will be visible, along with its Notes, and Tags on those Notes. This function must be called on the shard that owns the referenced notebook. (I.e. the shardId in /shard/shardId/edam/note must be the same as LinkedNotebook.shardId.) @param authenticationToken This should be an authenticationToken for the guest who has received the invitation to the share. (I.e. this should not be the result of NoteStore.authenticateToSharedNotebook) @param linkedNotebook This structure should contain identifying information and permissions to access the notebook in question. This must contain the valid fields for either a shared notebook (e.g. shareKey) or a public notebook (e.g. username, uri) @param afterUSN The client can pass this value to ask only for objects that have been updated after a certain point. This allows the client to receive updates after its last checkpoint rather than doing a full synchronization on every pass. The default value of "0" indicates that the client wants to get objects from the start of the account. @param maxEntries The maximum number of modified objects that should be returned in the result SyncChunk. This can be used to limit the size of each individual message to be friendly for network transfer. Applications should not request more than 256 objects at a time, and must handle the case where the service returns less than the requested number of objects in a given request even though more objects are available on the service. @param fullSyncOnly If true, then the client only wants initial data for a full sync. In this case, the service will not return any expunged objects, and will not return any Resources, since these are also provided in their corresponding Notes. @throws EDAMUserException @throws EDAMNotFoundException Parameters: - authenticationToken - linkedNotebook - afterUSN - maxEntries - fullSyncOnly """ pass def listNotebooks(self, authenticationToken): """ Returns a list of all of the notebooks in the account. Parameters: - authenticationToken """ pass def getNotebook(self, authenticationToken, guid): """ Returns the current state of the notebook with the provided GUID. The notebook may be active or deleted (but not expunged). @param guid The GUID of the notebook to be retrieved. @throws EDAMUserException @throws EDAMNotFoundException Parameters: - authenticationToken - guid """ pass def getDefaultNotebook(self, authenticationToken): """ Returns the notebook that should be used to store new notes in the user's account when no other notebooks are specified. Parameters: - authenticationToken """ pass def createNotebook(self, authenticationToken, notebook): """ Asks the service to make a notebook with the provided name. @param notebook The desired fields for the notebook must be provided on this object. The name of the notebook must be set, and either the 'active' or 'defaultNotebook' fields may be set by the client at creation. If a notebook exists in the account with the same name (via case-insensitive compare), this will throw an EDAMUserException. @return The newly created Notebook. The server-side GUID will be saved in this object's 'guid' field. @throws EDAMUserException Parameters: - authenticationToken - notebook """ pass def updateNotebook(self, authenticationToken, notebook): """ Submits notebook changes to the service. The provided data must include the notebook's guid field for identification. @param notebook The notebook object containing the requested changes. @return The Update Sequence Number for this change within the account. @throws EDAMUserException @throws EDAMNotFoundException Parameters: - authenticationToken - notebook """ pass def expungeNotebook(self, authenticationToken, guid): """ Permanently removes the notebook from the user's account. After this action, the notebook is no longer available for undeletion, etc. If the notebook contains any Notes, they will be moved to the current default notebook and moved into the trash (i.e. Note.active=false).

NOTE: This function is generally not available to third party applications. Calls will result in an EDAMUserException with the error code PERMISSION_DENIED. @param guid The GUID of the notebook to delete. @return The Update Sequence Number for this change within the account. @throws EDAMUserException

Parameters: - authenticationToken - guid """ pass def listTags(self, authenticationToken): """ Returns a list of the tags in the account. Evernote does not support the undeletion of tags, so this will only include active tags. Parameters: - authenticationToken """ pass def listTagsByNotebook(self, authenticationToken, notebookGuid): """ Returns a list of the tags that are applied to at least one note within the provided notebook. If the notebook is public, the authenticationToken may be ignored. @param notebookGuid the GUID of the notebook to use to find tags @throws EDAMNotFoundException Parameters: - authenticationToken - notebookGuid """ pass def getTag(self, authenticationToken, guid): """ Returns the current state of the Tag with the provided GUID. @param guid The GUID of the tag to be retrieved. @throws EDAMUserException @throws EDAMNotFoundException Parameters: - authenticationToken - guid """ pass def createTag(self, authenticationToken, tag): """ Asks the service to make a tag with a set of information. @param tag The desired list of fields for the tag are specified in this object. The caller must specify the tag name, and may provide the parentGUID. @return The newly created Tag. The server-side GUID will be saved in this object. @throws EDAMUserException @throws EDAMNotFoundException Parameters: - authenticationToken - tag """ pass def updateTag(self, authenticationToken, tag): """ Submits tag changes to the service. The provided data must include the tag's guid field for identification. The service will apply updates to the following tag fields: name, parentGuid @param tag The tag object containing the requested changes. @return The Update Sequence Number for this change within the account. @throws EDAMUserException @throws EDAMNotFoundException Parameters: - authenticationToken - tag """ pass def untagAll(self, authenticationToken, guid): """ Removes the provided tag from every note that is currently tagged with this tag. If this operation is successful, the tag will still be in the account, but it will not be tagged on any notes. This function is not indended for use by full synchronizing clients, since it does not provide enough result information to the client to reconcile the local state without performing a follow-up sync from the service. This is intended for "thin clients" that need to efficiently support this as a UI operation. @param guid The GUID of the tag to remove from all notes. @throws EDAMUserException @throws EDAMNotFoundException Parameters: - authenticationToken - guid """ pass def expungeTag(self, authenticationToken, guid): """ Permanently deletes the tag with the provided GUID, if present.

NOTE: This function is generally not available to third party applications. Calls will result in an EDAMUserException with the error code PERMISSION_DENIED. @param guid The GUID of the tag to delete. @return The Update Sequence Number for this change within the account. @throws EDAMUserException

@throws EDAMNotFoundException Parameters: - authenticationToken - guid """ pass def listSearches(self, authenticationToken): """ Returns a list of the searches in the account. Evernote does not support the undeletion of searches, so this will only include active searches. Parameters: - authenticationToken """ pass def getSearch(self, authenticationToken, guid): """ Returns the current state of the search with the provided GUID. @param guid The GUID of the search to be retrieved. @throws EDAMUserException