Module: Teamwork::Client::Notebook

Included in:
Teamwork::Client
Defined in:
lib/teamwork/client/notebook.rb

Instance Method Summary collapse

Instance Method Details

#get_notebooks(options = {}) ⇒ Object

GET all notebooks This method is a bit different as the response nests notebooks under projects, which itself is an array. Once the projects are parsed, lets map those and save the notebooks to an array options:

includeContent: Boolean (default false)

return: [Teamwork::Thing]



13
14
15
16
# File 'lib/teamwork/client/notebook.rb', line 13

def get_notebooks(options = {})
  objects_from_response(:get, "notebooks", "projects", options)
    .map { |project| project.notebooks.map { |notebook| Teamwork::Thing.new(notebook) }}.flatten
end