~tim/wuparty

2ad0d40ab6f1c4fd9cc5f87eaf9395100a33931e — Wilfried Deluche 8 years ago 8ddc94c
Added handshakeKey to add_webhook params
1 files changed, 8 insertions(+), 4 deletions(-)

M lib/wuparty.rb
M lib/wuparty.rb => lib/wuparty.rb +8 -4
@@ 140,8 140,10 @@ class WuParty
    end
  end

  def add_webhook(form_id, url, metadata = false)
    put("forms/#{form_id}/webhooks", :body => {'url' => url, 'metadata' => metadata})
  def add_webhook(form_id, url, args={})
    args[:metadata] ||= false
    args[:handshakeKey] ||= ""
    put("forms/#{form_id}/webhooks", :body => {'url' => url, 'handshakeKey' => args[:handshakeKey], 'metadata' => args[:metadata]})
  end

  def delete_webhook(form_id, webhook_hash)


@@ 240,8 242,10 @@ class WuParty
      @details[id]
    end

    def add_webhook(url, metadata = false)
      @party.add_webhook(@details["Hash"], url, metadata)
    def add_webhook(url, args={})
      args[:metadata] ||= false
      args[:handshakeKey] ||= ""
      @party.add_webhook(@details["Hash"], url, { :metadata => args[:metadata], :handshakeKey => args[:handshakeKey] })
    end

    def delete_webhook(webhook_id)