node-note
Evernote wrapper.
Install
$ npm install --save node-note
Configuration
You need Evernote API Key and config.json
, like this.
Usage
var config = ;var nodeNote = ; var evernote = token: configdeveloptoken sandbox: true; // Create new notevar options = title: 'New Note created by node-note' body: 'Here is the Evernote logo' file: './ev-logo.png' evernote; // Delete notevar options = title: 'note title' evernote;
API
evernote.createNote(options, callback)
Create new note.
options
title
Required
Type: String
Note title.
body
Type: String
Note body.
notebookName
Type: String
Notebook name of target.
file
Type: String
Attachement file.
tag
Type: Array
List of the tag name.
author
Type: String
The author of the content of the note.
url
Type: String
The original location where the resource was hosted.
width
Type: String
ex: 500px
Centering note contents by width
value.
callback(createdNote)
Type: Function
createdNote
Type: Object
Return created note. Represents a single note in the user's account.
evernote.deleteNote(options, callback)
Delete note.
options
Required title
or guid
field.
If you can set both field, set both field.
title
Type: String
Note title.
guid
Type: String
Note guid.
callback(deletedNote)
Type: Function
deletedNote
Type: Object
Return deleted note. Represents a single note in the user's account.
evernote.getNoteMetadata(options, callback)
Get note metadata.
options
word
Type: String
If present, a search query string that will filter the set of notes to be returned.
maxNotes
Type: Number
The mximum notes to return in this query.
callback(noteMetadataList)
Type: Function
noteMetadataList
Type: List
Return the metadata list of notes that match the criteria.
evernote.getNote(options, callback)
Get note.
options
guid
Required
Type: String
The GUID of the note to be retrieved.
withContent
Type: Bool
If true, the note will include the ENML contents of its 'content' field.
withRecouce
Type: Bool
If true, any Resource elements in this Note will include the binary contents of their 'data' field's body.
callback(note)
Type: Function
note
Type: Object
Returns the current state of the note in the service.
evenote.restoreNote(options, callback)
Restore note in trash.
options
Required title
or guid
field.
If you can set both field, set both field.
title
Type: String
note's title.
guid
Type: String
note's guid.
callback(restoredNote)
Type: Function
restoredNote
Type: Object
Return restored note.
evernote.updateNote(options, callback)
Submit a set of changes to a note to the service.
options
title
Required
Type: String
Note title.
newTitle
Type: String
New note title.
body
Type: String
Note body.
tag
Type: Array
List of the tag name.
width
Type: String
ex: 500px
Centering note contents by width
value.
callback(note)
Type: Function
note
Type: Object
Return the metadata (no contents) for the Note on the server after the update.
evernote.expungeNote(guid, callback)
Permanently removes a Note, and all of its Resources, from the service.
options
guid
Required
Type: String
Note guid.
callback(sequenceNum)
Type: Function
sequenceNum
Type: Number
The Update Sequence Number for this change within the account.
evernote.createNotebook(options, callback)
Create new notebook.
options
name
Required
Type: String
Notebook name.
callback(createdNotebook)
Type: Function
createdNotebook
Type: Object
evernote.expungeNotebook(guid, callback)
Permanently removes a Notebook from the service.
guid
Type: String
Note guid.
callback(sequenceNum)
Type: Function
sequencenum
Type: Number
The Update Sequence Number for this change within the account.
LICENSE
MIT