Class: Asana2Flowdock::Asana::Workspace

Inherits:
Model
  • Object
show all
Defined in:
lib/asana2flowdock/asana.rb

Instance Method Summary collapse

Methods inherited from Model

for, #initialize, #inspect

Constructor Details

This class inherits a constructor from Asana2Flowdock::Asana::Model

Instance Method Details

#projects(options = {}) ⇒ Object



184
185
186
# File 'lib/asana2flowdock/asana.rb', line 184

def projects(options = {})
  api.get("/workspaces/#{ id }/projects", Project, options)
end

#tasks(options = {}) ⇒ Object



188
189
190
191
192
193
194
195
196
197
198
# File 'lib/asana2flowdock/asana.rb', line 188

def tasks(options = {})
  options = Map.for(options)

  if options.has?(:assignee)
    api.get("/tasks", Task, options.merge(:workspace => id))
  else
    projects.map do |project|
      project.tasks(options)
    end.flatten.compact
  end
end