Sha256: d235f900d4c9ded7facd8d5dfcb747408c0b5e186091011f06141e569a8ae1f7
Contents?: true
Size: 720 Bytes
Versions: 11
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true module Boppers module Notifier class Hipchat attr_reader :api_token, :room def initialize(api_token:, room:, subscribe: nil) @api_token = api_token @room = room @subscribe = subscribe end 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 end end end
Version data entries
11 entries across 11 versions & 1 rubygems