Module: NotifieeAPI

Defined in:
lib/notifiee-ruby.rb,
lib/notifiee_api/client.rb,
lib/notifiee_api/version.rb,
lib/notifiee_api/exceptions.rb,
lib/notifiee_api/notifications.rb

Defined Under Namespace

Classes: Client, Error, Notifications, Unauthorized

Constant Summary collapse

VERSION =
"1.0.5"

Class Method Summary collapse

Class Method Details

.notify(notifiee, channels, message, **params) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/notifiee-ruby.rb', line 10

def notify(notifiee, channels, message, **params)
  channels = [channels].flatten

  payload = params.merge(
    notifiee: notifiee,
    channels: channels,
    message: message
  )

  NotifieeAPI::Notifications.create(payload)
end