Class: ENUtils::Notebook
- Inherits:
-
Evernote::EDAM::Type::Notebook
- Object
- Evernote::EDAM::Type::Notebook
- ENUtils::Notebook
- Defined in:
- lib/evernote_utils/notebook.rb
Instance Attribute Summary collapse
-
#defaultNotebook ⇒ Object
readonly
Evernote::EDAM::Type::Notebook fields guid:“afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz” name:“Books” updateSequenceNum:24108 defaultNotebook:false serviceCreated:1297607548000 serviceUpdated:1387262389000 restrictions:<Evernote::EDAM::Type::NotebookRestrictions …>.
-
#guid ⇒ Object
readonly
Evernote::EDAM::Type::Notebook fields guid:“afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz” name:“Books” updateSequenceNum:24108 defaultNotebook:false serviceCreated:1297607548000 serviceUpdated:1387262389000 restrictions:<Evernote::EDAM::Type::NotebookRestrictions …>.
-
#name ⇒ Object
readonly
Evernote::EDAM::Type::Notebook fields guid:“afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz” name:“Books” updateSequenceNum:24108 defaultNotebook:false serviceCreated:1297607548000 serviceUpdated:1387262389000 restrictions:<Evernote::EDAM::Type::NotebookRestrictions …>.
-
#restrictions ⇒ Object
readonly
Evernote::EDAM::Type::Notebook fields guid:“afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz” name:“Books” updateSequenceNum:24108 defaultNotebook:false serviceCreated:1297607548000 serviceUpdated:1387262389000 restrictions:<Evernote::EDAM::Type::NotebookRestrictions …>.
-
#serviceCreated ⇒ Object
readonly
Evernote::EDAM::Type::Notebook fields guid:“afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz” name:“Books” updateSequenceNum:24108 defaultNotebook:false serviceCreated:1297607548000 serviceUpdated:1387262389000 restrictions:<Evernote::EDAM::Type::NotebookRestrictions …>.
-
#serviceUpdated ⇒ Object
readonly
Evernote::EDAM::Type::Notebook fields guid:“afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz” name:“Books” updateSequenceNum:24108 defaultNotebook:false serviceCreated:1297607548000 serviceUpdated:1387262389000 restrictions:<Evernote::EDAM::Type::NotebookRestrictions …>.
-
#updateSequenceNum ⇒ Object
readonly
Evernote::EDAM::Type::Notebook fields guid:“afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz” name:“Books” updateSequenceNum:24108 defaultNotebook:false serviceCreated:1297607548000 serviceUpdated:1387262389000 restrictions:<Evernote::EDAM::Type::NotebookRestrictions …>.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(edam_notebook) ⇒ Notebook
constructor
A new instance of Notebook.
Constructor Details
#initialize(edam_notebook) ⇒ Notebook
Returns a new instance of Notebook.
15 16 17 18 19 20 21 22 23 |
# File 'lib/evernote_utils/notebook.rb', line 15 def initialize(edam_notebook) @guid = edam_notebook.guid @name = edam_notebook.name @updateSequenceNum = edam_notebook.updateSequenceNum @defaultNotebook = edam_notebook.defaultNotebook @serviceCreated = Time.at(edam_notebook.serviceCreated/1000) @serviceUpdated = Time.at(edam_notebook.serviceUpdated/1000) @restrictions = edam_notebook.restrictions end |
Instance Attribute Details
#defaultNotebook ⇒ Object (readonly)
Evernote::EDAM::Type::Notebook fields
guid:"afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz"
name:"Books"
updateSequenceNum:24108
defaultNotebook:false
serviceCreated:1297607548000
serviceUpdated:1387262389000
restrictions:<Evernote::EDAM::Type::NotebookRestrictions ...>
13 14 15 |
# File 'lib/evernote_utils/notebook.rb', line 13 def defaultNotebook @defaultNotebook end |
#guid ⇒ Object (readonly)
Evernote::EDAM::Type::Notebook fields
guid:"afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz"
name:"Books"
updateSequenceNum:24108
defaultNotebook:false
serviceCreated:1297607548000
serviceUpdated:1387262389000
restrictions:<Evernote::EDAM::Type::NotebookRestrictions ...>
13 14 15 |
# File 'lib/evernote_utils/notebook.rb', line 13 def guid @guid end |
#name ⇒ Object (readonly)
Evernote::EDAM::Type::Notebook fields
guid:"afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz"
name:"Books"
updateSequenceNum:24108
defaultNotebook:false
serviceCreated:1297607548000
serviceUpdated:1387262389000
restrictions:<Evernote::EDAM::Type::NotebookRestrictions ...>
13 14 15 |
# File 'lib/evernote_utils/notebook.rb', line 13 def name @name end |
#restrictions ⇒ Object (readonly)
Evernote::EDAM::Type::Notebook fields
guid:"afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz"
name:"Books"
updateSequenceNum:24108
defaultNotebook:false
serviceCreated:1297607548000
serviceUpdated:1387262389000
restrictions:<Evernote::EDAM::Type::NotebookRestrictions ...>
13 14 15 |
# File 'lib/evernote_utils/notebook.rb', line 13 def restrictions @restrictions end |
#serviceCreated ⇒ Object (readonly)
Evernote::EDAM::Type::Notebook fields
guid:"afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz"
name:"Books"
updateSequenceNum:24108
defaultNotebook:false
serviceCreated:1297607548000
serviceUpdated:1387262389000
restrictions:<Evernote::EDAM::Type::NotebookRestrictions ...>
13 14 15 |
# File 'lib/evernote_utils/notebook.rb', line 13 def serviceCreated @serviceCreated end |
#serviceUpdated ⇒ Object (readonly)
Evernote::EDAM::Type::Notebook fields
guid:"afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz"
name:"Books"
updateSequenceNum:24108
defaultNotebook:false
serviceCreated:1297607548000
serviceUpdated:1387262389000
restrictions:<Evernote::EDAM::Type::NotebookRestrictions ...>
13 14 15 |
# File 'lib/evernote_utils/notebook.rb', line 13 def serviceUpdated @serviceUpdated end |
#updateSequenceNum ⇒ Object (readonly)
Evernote::EDAM::Type::Notebook fields
guid:"afa4ba59-xxxx-42ed-xxxx-zzzzzzzzzzzz"
name:"Books"
updateSequenceNum:24108
defaultNotebook:false
serviceCreated:1297607548000
serviceUpdated:1387262389000
restrictions:<Evernote::EDAM::Type::NotebookRestrictions ...>
13 14 15 |
# File 'lib/evernote_utils/notebook.rb', line 13 def updateSequenceNum @updateSequenceNum end |
Class Method Details
.where(core, options = {}) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/evernote_utils/notebook.rb', line 25 def self.where(core, ={}) notebooks = core.notestore.listNotebooks(core.token).map{|nb| new(nb) } return notebooks if .empty? case [:name] when String notebooks.select{|nb| [:name] == nb.name } when Regexp notebooks.select{|nb| [:name] =~ nb.name } else notebooks end end |