Class: WebHookTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid/triggers.rb

Overview

Category: Connectivity

Instance Attribute Summary

Attributes inherited from Trigger

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ WebHookTrigger

Returns a new instance of WebHookTrigger.



406
407
408
409
410
411
412
413
414
# File 'lib/ruby-macrodroid/triggers.rb', line 406

def initialize(h={})

  options = {
    identifier: ''
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object Also known as: to_summary



416
417
418
419
420
421
422
423
# File 'lib/ruby-macrodroid/triggers.rb', line 416

def to_s(colour: false)
  
  url = "https://trigger.macrodroid.com/%s/%s" % \
      [@h[:macro].deviceid, @h[:identifier]]
  @s = 'WebHook (Url)' + "\n  " + url
  super()

end