summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKip Cole2012-10-06 09:10:57 +0800
committerKip Cole2012-10-06 09:10:57 +0800
commitabf6d64a30feaa8d7e1b155fad989c930f1aaa7a (patch)
treefe12f1846efb1ff3d5ca9a1eb5c77fc637ce7298
parent9849cdc7e47a511734a541e389a50b575f814fa3 (diff)
downloadevernote-abf6d64a30feaa8d7e1b155fad989c930f1aaa7a.tar.bz2
Refresh note content possible
-rw-r--r--lib/evernote/note_store.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/evernote/note_store.rb b/lib/evernote/note_store.rb
index 9293632..0f373a0 100644
--- a/lib/evernote/note_store.rb
+++ b/lib/evernote/note_store.rb
@@ -31,7 +31,7 @@ module Evernote
@offset = 0
@max = 100
end
-
+
def notes
@notes || all
end
@@ -39,7 +39,7 @@ module Evernote
def all(rows = max)
@filter = NoteFilter.new
@filter.notebook_guid = notebook.guid
- @notes = wrap_notes(notestore.find_notes(filter, offset, rows).notes)
+ @notes = wrap_notes(notestore.find_notes(filter.filter, offset, rows).notes)
end
def updated_since(time, rows = max)
@@ -72,9 +72,9 @@ module Evernote
@notestore = notestore
@note = note
end
-
+
def content(options = :all)
- @content ||= notestore.get_note(*args_from(options).unshift(note.guid))
+ @content ||= get_content(options)
end
def enml
@@ -101,6 +101,10 @@ module Evernote
note.resources || []
end
+ def get_content(options = :all)
+ notestore.get_note(*args_from(options).unshift(note.guid))
+ end
+
def method_missing(name, *args, &block)
@note.send(name.to_s.camelize(:lower), *args, &block)
end
@@ -115,6 +119,7 @@ module Evernote
return true, false, false, false
end
end
+
end