Module Tinder
In: lib/tinder/version.rb
lib/tinder/room.rb
lib/tinder/campfire.rb
lib/tinder/connection.rb
lib/tinder.rb

encoding: UTF-8

Methods

Classes and Modules

Class Tinder::AuthenticationFailed
Class Tinder::Campfire
Class Tinder::Connection
Class Tinder::Error
Class Tinder::ListenFailed
Class Tinder::Room
Class Tinder::SSLRequiredError

Constants

VERSION = '1.10.1' unless defined?(::Tinder::VERSION)

Public Class methods

Public Instance methods

Perform a request for the user with the given ID

Get the list of latest files for this room

The invite code use for guest

Get the url for guest access

Leave a room POST /room/#{id}/leave.xml

Listen for new messages in the room, parsing them with parse_message and then yielding them to the provided block as they arrive.

  room.listen do |m|
    room.speak "Go away!" if m[:body] =~ /Java/i
  end

Lock the room to prevent new users from entering and to disable logging

Change the name of the room

Modifies a hash representation of a Campfire message. Expands +:user_id+ to a full hash at +:user+, generates Timestamp from +:created_at+.

Full returned hash:

  • +:body+: the body of the message
  • +:user+: Campfire user, which is itself a hash, of:
    • +:id+: User id
    • +:name+: User name
    • +:email_address+: Email address
    • +:admin+: Boolean admin flag
    • +:created_at+: User creation timestamp
    • +:type+: User type (e.g. Member)
  • +:id+: Campfire message id
  • +:type+: Campfire message type
  • +:room_id+: Campfire room id
  • +:created_at+: Message creation timestamp

Get a list of recent messages Accepts a hash for options:

  • +:limit+: Restrict the number of messages returned
  • +:since_message_id+: Get messages created after the specified message id
rename(name)

Alias for name=

Search transcripts for the given term (returns an array of messages parsed via parse_message, see parse_message for format of returned message)

Post a new message to the chat room

Get the current topic

Get the transcript for the given date (Returns a hash in the same format as listen)

  room.transcript(Time.now)
  #=> [{:message=>"foobar!",
        :user_id=>"99999",
        :person=>"Brandon",
        :id=>"18659245",
        :timestamp=>=>Tue May 05 07:15:00 -0700 2009}]

The timestamp slot will typically have a granularity of five minutes.

Unlock the room

return the user with the given id; if it isn‘t in our room cache, do a request to get it

Get the list of users currently chatting for this room

Protected Instance methods

[Validate]