Class Tinder::Campfire
In: lib/tinder/campfire.rb
Parent: Object

Usage

  campfire = Tinder::Campfire.new 'mysubdomain', :token => 'xyz'

  room = campfire.create_room 'New Room', 'My new campfire room to test tinder'
  room.speak 'Hello world!'
  room.destroy

  room = campfire.find_room_by_guest_hash 'abc123', 'John Doe'
  room.speak 'Hello world!'

Methods

Attributes

connection  [R] 

Public Class methods

Create a new connection to the campfire account with the given subdomain.

Options:

  • +:ssl+: use SSL for the connection, which is required if you have a Campfire SSL account.
            Defaults to true
    
  • +:ssl_options+: SSL options passed to the underlaying Faraday connection. Allows to specify if the SSL certificate should be verified (:verify => true|false) and to specify the path to the ssl certs directory (:ca_path => "path/certs")
            Defaults to {:verify => true}
    
  • +:proxy+: a proxy URI. (e.g. :proxy => ‘user:pass@example.com:8000’)

    c = Tinder::Campfire.new("mysubdomain", :ssl => true)

Public Instance methods

Creates and returns a new Room with the given name and optionally a topic

Find a campfire room by its guest hash

Find a campfire room by id NOTE: id should be of type Integer

Find a campfire room by name

get the user info of the current user

Get an array of all rooms user is present in

Get an array of all the available rooms TODO: detect rooms that are full (no link)

List the users that are currently chatting in any room

[Validate]