class Everlog::Dom::Repository::Evernote
Constants
- TARGET
Public Class Methods
new(is_sandbox, config)
click to toggle source
# File lib/everlog/dom/repository/evernote.rb, line 5 def initialize(is_sandbox, config) @is_sandbox = is_sandbox @config = config end
Public Instance Methods
api_client()
click to toggle source
# File lib/everlog/dom/repository/evernote.rb, line 10 def api_client @api_client ||= Inf::Api::Evernote.new(@is_sandbox, @config) end
get_guid_forcibly(notebook_name)
click to toggle source
# File lib/everlog/dom/repository/evernote.rb, line 19 def get_guid_forcibly notebook_name api_client.notebooks.each {|n| return n.guid if n.name == notebook_name } api_client.create_notebook(notebook_name).guid end
save(title, content)
click to toggle source
# File lib/everlog/dom/repository/evernote.rb, line 14 def save(title, content) api_client.note.notebookGuid = get_guid_forcibly TARGET api_client.post_note(title, content) end