setWebHook(url, options = {}, fileOptions = {}) {
    /* The older method signature was setWebHook(url, cert).
     * We need to ensure backwards-compatibility while maintaining
     * consistency of the method signatures throughout the library */
    let cert;
    // Note: 'options' could be an object, if a stream was provided (in place of 'cert')
    if (typeof options !== 'object' || options instanceof stream.Stream) {
      deprecate('The method signature setWebHook(url, cert) has been deprecated since v0.25.0');
      cert = options;
      options = {}; // eslint-disable-line no-param-reassign
    } else {
      cert = options.certificate;
    }

    const opts = {
      qs: options,
    };
    opts.qs.url = url;

    if (cert) {
      try {
        const sendData = this._formatSendData('certificate', cert, fileOptions);
        opts.formData = sendData[0];
        opts.qs.certificate = sendData[1];
      } catch (ex) {
        return Promise.reject(ex);
      }
    }

    return this._request('setWebHook', opts);
  }
Specify an url to receive incoming updates via an outgoing webHook.
This method has an [older, compatible signature][setWebHook-v0.25.0]
that is being deprecated.

@param {String} url URL where Telegram will make HTTP Post. Leave empty to
delete webHook.
@param {Object} [options] Additional Telegram query options
@param {String|stream.Stream} [options.certificate] PEM certificate key (public).
@param {String} [options.secret_token] Optional secret token to be sent in a header `X-Telegram-Bot-Api-Secret-Token` in every webhook request.
@param {Object} [fileOptions] Optional file related meta-data
@return {Promise}
@see https://core.telegram.org/bots/api#setwebhook
@see https://github.com/yagop/node-telegram-bot-api/blob/master/doc/usage.md#sending-files