Class: Basecampx::Comment

Inherits:
Resource show all
Defined in:
lib/basecampx/resources/comment.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

#contentObject

Returns the value of attribute content.



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

def content
  @content
end

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#topic_urlObject

Returns the value of attribute topic_url.



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

def topic_url
  @topic_url
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

Class Method Details

.allObject



13
14
15
# File 'lib/basecampx/resources/comment.rb', line 13

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

.find(person_id) ⇒ Object



9
10
11
# File 'lib/basecampx/resources/comment.rb', line 9

def self.find person_id
  self.new Basecampx.request "people/#{person_id}.json"
end

Instance Method Details

#todosObject

GET /people/1/assigned_todos.json



18
19
20
# File 'lib/basecampx/resources/comment.rb', line 18

def todos
  TodoList.parse Basecampx.request "people/#{self.id}/assigned_todos.json"
end