Comparing version 1.0.2 to 1.1.0
10
main.js
@@ -56,3 +56,3 @@ 'use strict'; | ||
Api.prototype.getUpdates = function(offset, limit, timeout) { | ||
return yarl.get(this.url + 'setWebhook', {query: { | ||
return yarl.get(this.url + 'getUpdates', {query: { | ||
offset: offset, | ||
@@ -216,2 +216,10 @@ limit: limit, | ||
Api.prototype.answerInlineQuery = function(queryId, results, options) { | ||
options || (options = {}); | ||
options.inline_query_id = queryId; | ||
options.results = results; | ||
return yarl.post(this.url + 'answerInlineQuery', {body: options, json: true}); | ||
}; | ||
module.exports = Api; |
{ | ||
"name": "tg-yarl", | ||
"author": "Alexey Bystrov <strikeentco@gmail.com>", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A simple Promise based wrapper over Telegram Bot Api with additional features.", | ||
@@ -6,0 +6,0 @@ "engines": { |
@@ -201,2 +201,16 @@ tg-yarl | ||
## [answerInlineQuery(inline_query_id, results, [options])](https://core.telegram.org/bots/api#answerinlinequery) | ||
Use this method to send answers to an inline query. On success, True is returned.<br> | ||
No more than 50 results per query are allowed. | ||
### Params: | ||
* **inline_query_id** (*String*) - Unique identifier for the answered query. | ||
* **results** (*Array of [InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)*) - A JSON-serialized array of results for the inline query. | ||
* **[options]** (*Object*) - Inline Query options: | ||
* **cache_time** (*Integer*) - The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. | ||
* **is_personal** (*Boolean*) - Pass True, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query. | ||
* **next_offset** (*String*) - Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don‘t support pagination. Offset length can’t exceed 64 bytes. | ||
# Extra | ||
@@ -203,0 +217,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20673
179
296