2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-29 05:17:41 +00:00

setWebHook doc

This commit is contained in:
yago 2015-07-05 11:12:41 +02:00
parent 0a1e6bbb7f
commit 9bda20a5cc

View File

@ -142,6 +142,7 @@ TelegramBot.prototype._request = function (path, options) {
/** /**
* Returns basic information about the bot in form of a `User` object. * Returns basic information about the bot in form of a `User` object.
* @return {Promise} * @return {Promise}
* @see
*/ */
TelegramBot.prototype.getMe = function () { TelegramBot.prototype.getMe = function () {
var path = 'getMe'; var path = 'getMe';
@ -149,8 +150,10 @@ TelegramBot.prototype.getMe = function () {
}; };
/** /**
* Specify a url to receive incoming updates via an outgoing webHook. * Specify an url to receive incoming updates via an outgoing webHook.
* @param {String} url URL * @param {String} url URL where Telegram will make HTTP Post. Leave empty to
* delete webHook.
* @see https://core.telegram.org/bots/api#setwebhook
*/ */
TelegramBot.prototype.setWebHook = function (url) { TelegramBot.prototype.setWebHook = function (url) {
var path = 'setWebHook'; var path = 'setWebHook';
@ -160,6 +163,7 @@ TelegramBot.prototype.setWebHook = function (url) {
if (!resp) { if (!resp) {
throw new Error(resp); throw new Error(resp);
} }
return resp;
}); });
}; };