Class: Basecampx::TodoList

Inherits:
Resource show all
Defined in:
lib/basecampx/resources/todo_list.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#delete, #initialize, parse, #save, #update_attributes

Methods included from Relations

#has_many, #has_one, #mount

Constructor Details

This class inherits a constructor from Basecampx::Resource

Instance Attribute Details

#bucketObject

Returns the value of attribute bucket.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def bucket
  @bucket
end

#completedObject

Returns the value of attribute completed.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def completed
  @completed
end

#completed_countObject

Returns the value of attribute completed_count.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def completed_count
  @completed_count
end

#created_atObject

Returns the value of attribute created_at.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def description
  @description
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def name
  @name
end

#positionObject

Returns the value of attribute position.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def position
  @position
end

#remaining_countObject

Returns the value of attribute remaining_count.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def remaining_count
  @remaining_count
end

#updated_atObject

Returns the value of attribute updated_at.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/basecampx/resources/todo_list.rb', line 4

def url
  @url
end

Class Method Details

.allObject

GET /todolists.json shows active todolists for all projects.



11
12
13
# File 'lib/basecampx/resources/todo_list.rb', line 11

def self.all
  self.parse Basecampx.request "todolists.json"
end

.completedObject

GET /todolists/completed.json shows completed todolists for all projects.



16
17
18
# File 'lib/basecampx/resources/todo_list.rb', line 16

def self.completed
  self.parse Basecampx.request "todolists/completed.json"
end

.find(project_id, todolist_id) ⇒ Object



20
21
22
# File 'lib/basecampx/resources/todo_list.rb', line 20

def self.find project_id, todolist_id
  self.new Basecampx.request "projects/#{project_id}/todolists/#{todolist_id}.json"
end

Instance Method Details

#todosObject



24
25
26
# File 'lib/basecampx/resources/todo_list.rb', line 24

def todos
  assigned_todos
end