class Basecamp3::Campfire

A model for Basecamp's Campfire

{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

created_at[RW]
id[RW]
status[RW]
topic[RW]
updated_at[RW]

Public Class Methods

all(params = {}) click to toggle source

Returns a paginated list of all active campfires visible to the current user.

@param [Hash] params additional parameters @option params [Integer] :page (optional) to paginate results

@return [Array<Basecamp3::Campfire>]

# File lib/basecamp3/models/campfire.rb, line 29
def self.all(params = {})
  Basecamp3.request.get("/chats", params, Basecamp3::Campfire)
end
find(bucket_id, id) click to toggle source

Returns the campfire.

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

@return [Basecamp3::Campfire]

# File lib/basecamp3/models/campfire.rb, line 39
def self.find(bucket_id, id)
  Basecamp3.request.get("/buckets/#{bucket_id}/chats/#{id}", {}, Basecamp3::Campfire)
end

Public Instance Methods

lines() click to toggle source

Returns a list of related lines.

@return [Array<Basecamp3::CampfireLine>]

# File lib/basecamp3/models/campfire.rb, line 19
def lines
  @mapped_lines ||= Basecamp3::CampfireLine.all(bucket.id, id)
end