Method: Trello::Webhook.create

Defined in:
lib/trello/webhook.rb

.create(options) ⇒ Trello::Webhook

Create a new webhook and save it to Trello.

Parameters:

Options Hash (options):

  • :description (String) — default: optional

    A string with a length from 0 to 16384

  • :callback_url (String) — default: required

    A valid URL that is reachable with a HEAD request

  • :id_model (String) — default: required

    id of the model that should be hooked

Returns:

Raises:



41
42
43
44
45
46
# File 'lib/trello/webhook.rb', line 41

def create(options)
  client.create(:webhook,
      'description' => options[:description],
      'idModel'     => options[:id_model],
      'callbackURL' => options[:callback_url])
end