def create(self, description, hook_url, events, active=True, skip_cert_verification=False):
    """ Creates a new webhook. """
    url = repository_webhooks_url(self._namespace, self._repository_name)
    data = {
      'description': description,
      'url': hook_url,
      'active': active,
      'events': events,
      'skip_cert_verification': skip_cert_verification,
    }

    return self._dispatcher.dispatch(url, method='POST', access_token=self._access_token,
                                     access_token_secret=self._access_token_secret, json_body=True,
                                     **data)
 def all(self):
   """ Returns a list of the webhooks found under the repository. """
   url = repository_webhooks_url(self._namespace, self._repository_name)
   return self._dispatcher.dispatch(url, access_token=self._access_token,
                                         access_token_secret=self._access_token_secret)