Class: Basecamp3::CampfireLine
- Includes:
- Basecamp3::Concerns::Bucketable, Basecamp3::Concerns::Creatorable, Basecamp3::Concerns::Parentable
- Defined in:
- lib/basecamp3/models/campfire_line.rb
Overview
A model for Basecamp's CampfireLine
For more information, see the official Basecamp3 API documentation for Campfires
Constant Summary
- REQUIRED_FIELDS =
%w(content)
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
-
.all(bucket_id, parent_id, params = {}) ⇒ Array<Basecamp3::CampfireLine>
Returns a paginated list of campfire lines.
-
.create(bucket_id, parent_id, data) ⇒ Basecamp3::CampfireLine
Creates a campfire line.
-
.find(bucket_id, parent_id, id) ⇒ Basecamp3::CampfireLine
Returns the campfire line.
Methods included from Basecamp3::Concerns::Parentable
Methods included from Basecamp3::Concerns::Bucketable
Methods included from Basecamp3::Concerns::Creatorable
Methods inherited from Model
Constructor Details
This class inherits a constructor from Basecamp3::Model
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content
9 10 11 |
# File 'lib/basecamp3/models/campfire_line.rb', line 9 def content @content end |
#created_at ⇒ Object
Returns the value of attribute created_at
9 10 11 |
# File 'lib/basecamp3/models/campfire_line.rb', line 9 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id
9 10 11 |
# File 'lib/basecamp3/models/campfire_line.rb', line 9 def id @id end |
#status ⇒ Object
Returns the value of attribute status
9 10 11 |
# File 'lib/basecamp3/models/campfire_line.rb', line 9 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
9 10 11 |
# File 'lib/basecamp3/models/campfire_line.rb', line 9 def updated_at @updated_at end |
Class Method Details
.all(bucket_id, parent_id, params = {}) ⇒ Array<Basecamp3::CampfireLine>
Returns a paginated list of campfire lines.
25 26 27 |
# File 'lib/basecamp3/models/campfire_line.rb', line 25 def self.all(bucket_id, parent_id, params = {}) Basecamp3.request.get("/buckets/#{bucket_id}/chats/#{parent_id}/lines", params, Basecamp3::CampfireLine) end |
.create(bucket_id, parent_id, data) ⇒ Basecamp3::CampfireLine
Creates a campfire line.
48 49 50 51 |
# File 'lib/basecamp3/models/campfire_line.rb', line 48 def self.create(bucket_id, parent_id, data) self.validate_required(data) Basecamp3.request.post("/buckets/#{bucket_id}/chats/#{parent_id}/lines", data, Basecamp3::CampfireLine) end |
.find(bucket_id, parent_id, id) ⇒ Basecamp3::CampfireLine
Returns the campfire line.
36 37 38 |
# File 'lib/basecamp3/models/campfire_line.rb', line 36 def self.find(bucket_id, parent_id, id) Basecamp3.request.get("/buckets/#{bucket_id}/chats/#{parent_id}/lines/#{id}", {}, Basecamp3::CampfireLine) end |