Skip to content

Commit

Permalink
doc: Minor fixes, Update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
GochoMugo committed Nov 27, 2017
1 parent 65384a1 commit 79118b9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

Added:

1. Add Bot API v3.4 methods:
* (#439) *TelegramBot#editMessageLiveLocation*, *TelegramBot#stopMessageLiveLocation* (by @kamikazechaser)
1. Add `metadata` argument in `message` event (and
friends e.g. `text`, `audio`, etc.) (#409) (by @jlsjonas, @GochoMugo)
1. Add support for Node.js v9 (by @GochoMugo)
Expand Down
20 changes: 12 additions & 8 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,32 +707,36 @@ Use this method to send point on the map.
<a name="TelegramBot+editMessageLiveLocation"></a>

### telegramBot.editMessageLiveLocation(latitude, longitude, [options]) ⇒ <code>Promise</code>
Edit live location.
Use this method to edit live location messages.
Use this method to edit live location messages sent by
the bot or via the bot (for inline bots).

Note that you must provide one of chat_id, message_id, or
inline_message_id in your request.

**Kind**: instance method of <code>[TelegramBot](#TelegramBot)</code>
**Info**: You must pass in either a chat_id, message_id or an inline_message_id in your addidtional options.
**See**: https://core.telegram.org/bots/api#editmessagelivelocation

| Param | Type | Description |
| --- | --- | --- |
| latitude | <code>Float</code> | Latitude of location |
| longitude | <code>Float</code> | Longitude of location |
| [options] | <code>Object</code> | Additional Telegram query options |
| [options] | <code>Object</code> | Additional Telegram query options (provide either one of chat_id, message_id, or inline_message_id here) |

<a name="TelegramBot+stopMessageLiveLocation"></a>

### telegramBot.stopMessageLiveLocation([options]) ⇒ <code>Promise</code>
Stop live location.
Use this method to stop updating live location messages.
Use this method to stop updating a live location message sent by
the bot or via the bot (for inline bots) before live_period expires.

Note that you must provide one of chat_id, message_id, or
inline_message_id in your request.

**Kind**: instance method of <code>[TelegramBot](#TelegramBot)</code>
**Info**: You must pass in either a chat_id, message_id or an inline_message_id in your addidtional options.
**See**: https://core.telegram.org/bots/api#stopmessagelivelocation

| Param | Type | Description |
| --- | --- | --- |
| [options] | <code>Object</code> | Additional Telegram query options |
| [options] | <code>Object</code> | Additional Telegram query options (provide either one of chat_id, message_id, or inline_message_id here) |

<a name="TelegramBot+sendVenue"></a>

Expand Down
24 changes: 14 additions & 10 deletions src/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -1186,34 +1186,38 @@ class TelegramBot extends EventEmitter {
}

/**
* Edit live location.
* Use this method to edit live location messages.
* Use this method to edit live location messages sent by
* the bot or via the bot (for inline bots).
*
* Note that you must provide one of chat_id, message_id, or
* inline_message_id in your request.
*
* @param {Float} latitude Latitude of location
* @param {Float} longitude Longitude of location
* @param {Object} [options] Additional Telegram query options
* @param {Object} [options] Additional Telegram query options (provide either one of chat_id, message_id, or inline_message_id here)
* @return {Promise}
* @info You must pass in either a chat_id, message_id or an inline_message_id in your addidtional options.
* @see https://core.telegram.org/bots/api#editmessagelivelocation
*/
editMessageLiveLocation(latitude, longitude, form = {}) {
form.latitude = latitude;
form.longitude = longitude;
return this._request('editMessageLiveLocation', { form });
}

/**
* Stop live location.
* Use this method to stop updating live location messages.
* Use this method to stop updating a live location message sent by
* the bot or via the bot (for inline bots) before live_period expires.
*
* @param {Object} [options] Additional Telegram query options
* Note that you must provide one of chat_id, message_id, or
* inline_message_id in your request.
*
* @param {Object} [options] Additional Telegram query options (provide either one of chat_id, message_id, or inline_message_id here)
* @return {Promise}
* @info You must pass in either a chat_id, message_id or an inline_message_id in your addidtional options.
* @see https://core.telegram.org/bots/api#stopmessagelivelocation
*/
stopMessageLiveLocation(form = {}) {
return this._request('stopMessageLiveLocation', { form });
}
}

/**
* Send venue.
Expand Down

0 comments on commit 79118b9

Please sign in to comment.