~tim/wuparty

9fce0ae5d3dfaad6ddd6efb7d1d2c1d89fe3b0b1 — Aaron Oman 10 years ago d11fe78
Use correct webhook http method and add a webhook delete method.
1 files changed, 10 insertions(+), 2 deletions(-)

M lib/wuparty.rb
M lib/wuparty.rb => lib/wuparty.rb +10 -2
@@ 128,8 128,12 @@ class WuParty
    end
  end

  def webhook(form_id, url)
    WuParty.put("forms/#{form_id}/webhook", :party => self, :body => {'url' => url})
  def add_webhook(form_id, url)
    put("forms/#{form_id}/webhooks", :body => {'url' => url})
  end

  def delete_webhook(form_id, webhook_hash)
    delete("forms/#{form_id}/webhooks/#{webhook_hash}")
  end

  # Returns details about the specified report.


@@ 151,6 155,10 @@ class WuParty
    handle_http_verb(:put, method, options)
  end

  def delete(method, options={}) # :nodoc:
    handle_http_verb(:delete, method, options)
  end

  private

    def base_url