Class: DAF::PushbulletAction

Inherits:
Action
  • Object
show all
Defined in:
lib/daf/actions/pushbullet_action.rb

Overview

An action that sends an sms using twilio based on parameters

Instance Method Summary collapse

Methods inherited from Action

#activate

Methods included from Configurable

included

Instance Method Details

#clientObject



12
13
14
# File 'lib/daf/actions/pushbullet_action.rb', line 12

def client
  @client ||= Washbullet::Client.new(@key)
end

#invokeObject



16
17
18
19
20
21
22
23
24
# File 'lib/daf/actions/pushbullet_action.rb', line 16

def invoke
  client.push_note(receiver:   :device,
                   identifier: @identifier,
                   params: {
                     title: @title,
                     body:  @message
                   }
                  )
end