Sha256: 12e51acb93b5f707876c7d9f868e0b28bbcaaa7f8c18cfe95d2a71f9b8f8c613

Contents?: true

Size: 394 Bytes

Versions: 1

Compression:

Stored size: 394 Bytes

Contents

require 'flock/notifier/version'
require 'flock/notifier/connection'

module Flock
  class Notifier
    SEND_MESSAGE_HOOK_BASE_URL = 'https://api.flock.com/hooks/sendMessage/'

    def initialize webhook_uid
      endpoint    = SEND_MESSAGE_HOOK_BASE_URL + webhook_uid
      @connection = Connection.new endpoint
    end

    def ping(message)
      @connection.post(message)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flock-notifier-0.1.0 lib/flock/notifier.rb