mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
doc: Minor fixes on documentation
This commit is contained in:
parent
0781ae685d
commit
4358f20dbb
12
doc/api.md
12
doc/api.md
@ -112,17 +112,17 @@ Emits `message` when a message arrives.
|
||||
| [options.polling.params] | <code>Object</code> | | Parameters to be used in polling API requests. See https://core.telegram.org/bots/api#getupdates for more information. |
|
||||
| [options.polling.params.timeout] | <code>Number</code> | <code>10</code> | Timeout in seconds for long polling. |
|
||||
| [options.webHook] | <code>Boolean</code> | <code>Object</code> | <code>false</code> | Set true to enable WebHook or set options |
|
||||
| [options.webHook.host] | <code>String</code> | <code>0.0.0.0</code> | Host to bind to |
|
||||
| [options.webHook.host] | <code>String</code> | <code>"0.0.0.0"</code> | Host to bind to |
|
||||
| [options.webHook.port] | <code>Number</code> | <code>8443</code> | Port to bind to |
|
||||
| [options.webHook.key] | <code>String</code> | | Path to file with PEM private key for webHook server. The file is read **synchronously**! |
|
||||
| [options.webHook.cert] | <code>String</code> | | Path to file with PEM certificate (public) for webHook server. The file is read **synchronously**! |
|
||||
| [options.webHook.pfx] | <code>String</code> | | Path to file with PFX private key and certificate chain for webHook server. The file is read **synchronously**! |
|
||||
| [options.webHook.autoOpen] | <code>Boolean</code> | <code>true</code> | Open webHook immediately |
|
||||
| [options.webHook.https] | <code>Object</code> | | Options to be passed to `https.createServer()`. Note that `options.webHook.key`, `options.webHook.cert` and `options.webHook.pfx`, if provided, will be used to override `key`, `cert` and `pfx` in this object, respectively. See https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener for more information. |
|
||||
| [options.webHook.healthEndpoint] | <code>String</code> | <code>/healthz</code> | An endpoint for health checks that always responds with 200 OK |
|
||||
| [options.webHook.healthEndpoint] | <code>String</code> | <code>"/healthz"</code> | An endpoint for health checks that always responds with 200 OK |
|
||||
| [options.onlyFirstMatch] | <code>Boolean</code> | <code>false</code> | Set to true to stop after first match. Otherwise, all regexps are executed |
|
||||
| [options.request] | <code>Object</code> | | Options which will be added for all requests to telegram api. See https://github.com/request/request#requestoptions-callback for more information. |
|
||||
| [options.baseApiUrl] | <code>String</code> | <code>https://api.telegram.org</code> | API Base URl; useful for proxying and testing |
|
||||
| [options.baseApiUrl] | <code>String</code> | <code>"https://api.telegram.org"</code> | API Base URl; useful for proxying and testing |
|
||||
| [options.filepath] | <code>Boolean</code> | <code>true</code> | Allow passing file-paths as arguments when sending files, such as photos using `TelegramBot#sendPhoto()`. See [usage information][usage-sending-files-performance] for more information on this option and its consequences. |
|
||||
| [options.badRejection] | <code>Boolean</code> | <code>false</code> | Set to `true` **if and only if** the Node.js version you're using terminates the process on unhandled rejections. This option is only for *forward-compatibility purposes*. |
|
||||
|
||||
@ -234,7 +234,11 @@ This method has an [older, compatible signature][setWebHook-v0.25.0]
|
||||
that is being deprecated.
|
||||
|
||||
**Kind**: instance method of <code>[TelegramBot](#TelegramBot)</code>
|
||||
**See**: https://core.telegram.org/bots/api#setwebhook
|
||||
**See**
|
||||
|
||||
- https://core.telegram.org/bots/api#setwebhook
|
||||
- https://github.com/yagop/node-telegram-bot-api/blob/master/doc/usage.md#sending-files
|
||||
|
||||
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
|
@ -153,7 +153,7 @@ class TelegramBot extends EventEmitter {
|
||||
* See https://core.telegram.org/bots/api#getupdates for more information.
|
||||
* @param {Number} [options.polling.params.timeout=10] Timeout in seconds for long polling.
|
||||
* @param {Boolean|Object} [options.webHook=false] Set true to enable WebHook or set options
|
||||
* @param {String} [options.webHook.host=0.0.0.0] Host to bind to
|
||||
* @param {String} [options.webHook.host="0.0.0.0"] Host to bind to
|
||||
* @param {Number} [options.webHook.port=8443] Port to bind to
|
||||
* @param {String} [options.webHook.key] Path to file with PEM private key for webHook server.
|
||||
* The file is read **synchronously**!
|
||||
@ -166,11 +166,11 @@ class TelegramBot extends EventEmitter {
|
||||
* Note that `options.webHook.key`, `options.webHook.cert` and `options.webHook.pfx`, if provided, will be
|
||||
* used to override `key`, `cert` and `pfx` in this object, respectively.
|
||||
* See https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener for more information.
|
||||
* @param {String} [options.webHook.healthEndpoint=/healthz] An endpoint for health checks that always responds with 200 OK
|
||||
* @param {String} [options.webHook.healthEndpoint="/healthz"] An endpoint for health checks that always responds with 200 OK
|
||||
* @param {Boolean} [options.onlyFirstMatch=false] Set to true to stop after first match. Otherwise, all regexps are executed
|
||||
* @param {Object} [options.request] Options which will be added for all requests to telegram api.
|
||||
* See https://github.com/request/request#requestoptions-callback for more information.
|
||||
* @param {String} [options.baseApiUrl=https://api.telegram.org] API Base URl; useful for proxying and testing
|
||||
* @param {String} [options.baseApiUrl="https://api.telegram.org"] API Base URl; useful for proxying and testing
|
||||
* @param {Boolean} [options.filepath=true] Allow passing file-paths as arguments when sending files,
|
||||
* such as photos using `TelegramBot#sendPhoto()`. See [usage information][usage-sending-files-performance]
|
||||
* for more information on this option and its consequences.
|
||||
@ -477,6 +477,7 @@ class TelegramBot extends EventEmitter {
|
||||
* @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
|
||||
*/
|
||||
setWebHook(url, options = {}, fileOptions = {}) {
|
||||
/* The older method signature was setWebHook(url, cert).
|
||||
|
Loading…
x
Reference in New Issue
Block a user