'Create/update a pubsubhubbub hook.
:param str mode: (required), accepted values: (\'subscribe\',
\'unsubscribe\')
:param str topic: (required), form:
https://github.com/:user/:repo/events/:event
:param str callback: (required), the URI that receives the updates
:param str secret: (optional), shared secret key that generates a
SHA1 HMAC of the payload content.
:returns: bool'

@requires_auth
def pubsubhubbub(self, mode, topic, callback, secret=u''):

    from re import match
    m = match(u'https?://[\\w\\d\\-\\.\\:]+/\\w[\\w-]+\\w/[\\w\\._-]+/events/\\w+', topic)
    status = False
    if (mode and topic and callback and m):
        data = [(u'hub.mode', mode), (u'hub.topic', topic), (u'hub.callback', callback)]
        if secret:
            data.append((u'hub.secret', secret))
        url = self._build_url(u'hub')
        status = self._boolean(self._post(url, data=data, json=False, headers={u'Content-Type': u'application/x-www-form-urlencoded'}), 204, 404)
    return status
