lib/helpers/evernote.rb in evertils-0.1.11 vs lib/helpers/evernote.rb in evertils-0.1.12
- old
+ new
@@ -145,11 +145,11 @@
end
results.should_eval_to(false)
end
- def create_note(title = date_templates[$request.command], body = template_contents, p_notebook_name = nil, file = nil, share_note = false)
+ def create_note(title = date_templates[$request.command], body = template_contents, p_notebook_name = nil, file = nil, share_note = false, created_on)
# Create note object
our_note = ::Evernote::EDAM::Type::Note.new
our_note.resources = []
our_note.tagNames = []
@@ -170,10 +170,11 @@
n_body += "<en-note>#{body}</en-note>"
# setup note properties
our_note.title = title
our_note.content = n_body
+ our_note.created = created_on if !created_on.nil?
# properly tag logs
case $request.command
when :weekly
our_note.tagNames << "week-#{::Time.now.strftime('%V').to_i}"
@@ -192,9 +193,10 @@
our_note.notebookGuid = parent_notebook.guid
end
## Attempt to create note in Evernote account
begin
+ puts our_note.inspect
output = {}
output[:note] = @@store.createNote(@@developer_token, our_note)
if share_note
shareKey = @@store.shareNote(@@developer_token, output[:note].guid)
\ No newline at end of file