Method: Particle::Client::Webhooks#webhook

Defined in:
lib/particle/client/webhooks.rb

#webhook(target) ⇒ Webhook

Create a domain model for a Particle webhook

Parameters:

  • target (String, Hash, Webhook)

    A webhook id, hash of attributes or Device object

Returns:

  • (Webhook)

    A webhook object to interact with



15
16
17
18
19
20
21
# File 'lib/particle/client/webhooks.rb', line 15

def webhook(target)
  if target.is_a? Webhook
    target
  else
    Webhook.new(self, target)
  end
end