class Basecamp3::CampfireLine

A model for Basecamp's CampfireLine

{github.com/basecamp/bc3-api/blob/master/sections/campfires.md#campfires For more information, see the official Basecamp3 API documentation for Campfires}

Constants

REQUIRED_FIELDS

Attributes

content[RW]
created_at[RW]
id[RW]
status[RW]
updated_at[RW]

Public Class Methods

all(bucket_id, parent_id, params = {}) click to toggle source

Returns a paginated list of campfire lines.

@param [Integer] bucket_id the id of the bucket @param [Integer] parent_id the id of the campfire @param [Hash] params additional parameters @option params [Integer] :page (optional) to paginate results

@return [Array<Basecamp3::CampfireLine>]

# 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) click to toggle source

Creates a campfire line.

@param [Integer] bucket_id the id of the bucket @param [Integer] parent_id the id of the campfire @param [Hash] data the data to create a campfire line with @option params [Integer] :content (required) the body of the campfire line

@return [Basecamp3::CampfireLine]

# 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) click to toggle source

Returns the campfire line.

@param [Integer] bucket_id the id of the bucket @param [Integer] parent_id the id of the campfire @param [Integer] id the id of the campfire line

@return [Basecamp3::CampfireLine]

# 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