class Boppers::Notifier::Hipchat
Attributes
api_token[R]
room[R]
Public Class Methods
new(api_token:, room:, subscribe: nil)
click to toggle source
# File lib/boppers/notifier/hipchat.rb, line 8 def initialize(api_token:, room:, subscribe: nil) @api_token = api_token @room = room @subscribe = subscribe end
Public Instance Methods
call(title, message, options)
click to toggle source
# File lib/boppers/notifier/hipchat.rb, line 14 def call(title, message, options) endpoint = "https://api.hipchat.com/v2/room/#{room}/notification" HttpClient.post(endpoint, message_format: "text", color: options.fetch(:color, "gray"), notify: true, message: message, title: title, auth_token: api_token) end