def send(from, message, options_or_notify = {})
      if from.length > 20
        raise UsernameTooLong, "Username #{from} is `#{from.length} characters long. Limit is 20'"
      end
      if options_or_notify == true or options_or_notify == false
        warn 'DEPRECATED: Specify notify flag as an option (e.g., :notify => true)'
        options = { :notify => options_or_notify }
      else
        options = options_or_notify
      end

      merged_options = { :color => 'yellow', :notify => false, :message_format => 'html' }.merge options

      body = {
        :room_id        => room_id,
        :from           => from,
        :message        => message,
        :message_format => merged_options[:message_format],
        :color          => merged_options[:color],
        :card           => merged_options[:card],
        :notify         => @api.bool_val(merged_options[:notify])
      }.delete_if { |_k, v| v.nil? }

      response = self.class.post(@api.send_config[:url],
        :query => { :auth_token => @token },
        :body  => body.send(@api.send_config[:body_format]),
        :headers => @api.headers
      )

      ErrorHandler.response_code_to_exception_for :room, room_id, response
      true
    end
def send(from, message, options_or_notify = {})
      if from.length > 20
        raise UsernameTooLong, "Username #{from} is `#{from.length} characters long. Limit is 20'"
      end
      if options_or_notify == true or options_or_notify == false
        warn 'DEPRECATED: Specify notify flag as an option (e.g., :notify => true)'
        options = { :notify => options_or_notify }
      else
        options = options_or_notify
      end

      merged_options = { :color => 'yellow', :notify => false, :message_format => 'html' }.merge options

      body = {
        :room_id        => room_id,
        :from           => from,
        :message        => message,
        :message_format => merged_options[:message_format],
        :color          => merged_options[:color],
        :card           => merged_options[:card],
        :notify         => @api.bool_val(merged_options[:notify])
      }.delete_if { |_k, v| v.nil? }

      response = self.class.post(@api.send_config[:url],
        :query => { :auth_token => @token },
        :body  => body.send(@api.send_config[:body_format]),
        :headers => @api.headers
      )

      ErrorHandler.response_code_to_exception_for :room, room_id, response
      true
    end
Send a notification message to this room.

 Usage:

   # Default
   send 'nickname', 'some message'

   # Notify users and color the message red
   send 'nickname', 'some message', :notify => true, :color => 'red'

   # Notify users (deprecated)
   send 'nickname', 'some message', true

 Options:

 +color+::  "yellow", "red", "green", "purple", or "random"
            (default "yellow")
 +notify+:: true or false
            (default false)