Get a webhook

@param  {String}   webhookId
@param  {Function} callback         Callback function
181311
function(webhookId, callback) {
      utils.debug('Webhooks get: ' + webhookId);
      request.get({
        path: '/webhooks/' + utils.toUUID(webhookId),
      }, callback);
    }
142276
function(callback)
    {
        var params = util.extend({count:1}, this.params);        
        this.api.doRequest("GET", this.path, params, function(err, res) {
            if (err)
            {
                return callback(err);
            }                    
            callback(null, res.count);
        });
    }
1195999
def get_webhook(self, scaling_group, policy, webhook):
        
        return self._manager.get_webhook(scaling_group, policy, webhook)
1361848
function createEventSource(webhook, options)
{
  var self = this

  var eventSource = new EventSource(webhook, options)

  eventSource.addEventListener('open', this.emit.bind(this, 'open', webhook))
  eventSource.addEventListener('message', function(message)
  {
    self.push(message.data)
  })

  return eventSource
}
260330
public static WebhookEndpoint retrieve(String webhookEndpoint) throws StripeException {
    return retrieve(webhookEndpoint, (Map<String, Object>) null, (RequestOptions) null);
  }
1014142
function RequestHooks_has(regex) {
        if (!Type.isRegExp(regex)) {
            throw new error.DataError({regex: regex}, "RequestHooks.has regex must be regex type");
        }
        return !!this.hooks.filter(function (item) {
            return item.key.source === regex.source;
        }).shift();
    }
365155
def create_webhook(self, events, url, payload_format):
        """"""
        body = {
            "Events": events,
            "Url": url,
            "PayloadFormat": payload_format}
        response = self._post(self.uri_for("webhooks"), json.dumps(body))
        return json_to_py(response)
510333
def webhooks(self):
        
        if self._webhooks is None:
            self._webhooks = WebhookList(
                self._version,
                service_sid=self._solution['service_sid'],
                channel_sid=self._solution['sid'],
            )
        return self._webhooks
1160856
public Webhook get(final String webhookId) throws OpenpayServiceException, ServiceUnavailableException {
		String path = String.format(GET_PATH, this.getMerchantId(), webhookId);
		return this.getJsonClient().get(path, Webhook.class);
	}
1233431
function Logger_addHook(callback) {
            if (!Type.isFunction(callback)) {
                throw new error.Exception('Logger hook must be function');
            }
            this.hooks.push(callback);
        }
171312
function addUnloadHook () {
  window.onbeforeunload = function (e) {
    var msg = "Are you sure? Any unsaved progress will be lost."
    e = e || window.event;

    // For IE and Firefox prior to version 4
    if (e) {
      e.returnValue = msg;
    }

    // For Safari
    return msg;
  };
}
677436
func (c oauthClient) Webhook(webhookID uint) (wl.Webhook, error) {
	allWebhooks, err := c.Webhooks()
	for _, w := range allWebhooks {
		if w.ID == webhookID {
			return w, err
		}
	}

	return wl.Webhook{}, fmt.Errorf("webhook not found")
}
436510
def subscribe_to_address_webhook(callback_url, subscription_address, event='tx-confirmation', confirmations=0, confidence=0.00, coin_symbol='btc', api_key=None):
    '''
    
    '''
    assert is_valid_coin_symbol(coin_symbol)
    assert is_valid_address_for_coinsymbol(subscription_address, coin_symbol)
    assert api_key, 'api_key required'

    url = make_url(coin_symbol, 'hooks')

    params = {'token': api_key}
    data = {
        'event': event,
        'url': callback_url,
        'address': subscription_address,
    }

    if event == 'tx-confirmation' and confirmations:
        data['confirmations'] = confirmations
    elif event == 'tx-confidence' and confidence:
        data['confidence'] = confidence

    r = requests.post(url, json=data, params=params, verify=True, timeout=TIMEOUT_IN_SECONDS)
    response_dict = get_valid_json(r)
    return response_dict['id']
410125
def send_webhook(config, payload):
    
    try:
        response = requests.post(
            config['webhook_url'],
            data=json.dumps(payload, cls=ModelJSONEncoder),
            headers={config['api_key_header_name']: config['api_key']},
        )
    except Exception as e:
        logger.warning('Unable to send webhook: ({1}) {2}'.format(
            e.__class__.__name__,
            e.message,
        ))
    else:
        logger.debug('Webhook response: ({0}) {1}'.format(
            response.status_code,
            response.text,
        ))
936388
func (d *ddl) GetHook() Callback {
	d.mu.Lock()
	defer d.mu.Unlock()

	return d.mu.hook
}
307929
function updateProjectHooks(projectId, hooks, callback) {
        return self.projectCollection.findOne({_id: projectId})
            .then(function (projectData) {
                if (!projectData) {
                    throw new Error('no such project [' + projectId + ']');
                }

                // always update webhook information as a whole to allow remove and create and update as well
                projectData.hooks = hooks;

                return self.projectCollection.updateOne({_id: projectId}, projectData, {upsert: true});
            })
            .then(function () {
                return getProject(projectId);
            })
            .nodeify(callback);
    }
210502
function(type, callbacks) {
        $.each(callbacks, function(i, callback) {
            this.addHook(type, callback);
        }.bind(this));
    }