limber-api-node-telegram
Advanced tools
Comparing version 1.0.1 to 1.0.2
'use strict' | ||
const LoginUrl = require('./LoginUrl') | ||
const CallbackGame = require('./CallbackGame') | ||
@@ -15,3 +14,2 @@ | ||
* @param {string|null} [url] | ||
* @param {LoginUrl|null} [loginUrl] | ||
* @param {string|null} [callbackData] | ||
@@ -21,17 +19,6 @@ * @param {string|null} [switchInlineQuery] | ||
* @param {CallbackGame|null} [callbackGame] | ||
* @param {boolean|null} [pay] | ||
*/ | ||
constructor( | ||
text, | ||
url, | ||
loginUrl, | ||
callbackData, | ||
switchInlineQuery, | ||
switchInlineQueryCurrentChat, | ||
callbackGame, | ||
pay | ||
) { | ||
constructor(text, url, callbackData, switchInlineQuery, switchInlineQueryCurrentChat, callbackGame) { | ||
this._text = text | ||
this._url = url | ||
this._loginUrl = loginUrl | ||
this._callbackData = callbackData | ||
@@ -41,3 +28,2 @@ this._switchInlineQuery = switchInlineQuery | ||
this._callbackGame = callbackGame | ||
this._pay = pay | ||
} | ||
@@ -54,3 +40,3 @@ | ||
/** | ||
* HTTP or tg:// url to be opened when button is pressed | ||
* HTTP url to be opened when button is pressed | ||
* @returns {string|null} | ||
@@ -63,10 +49,2 @@ */ | ||
/** | ||
* An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. | ||
* @returns {LoginUrl|null} | ||
*/ | ||
get loginUrl() { | ||
return this._loginUrl | ||
} | ||
/** | ||
* Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes | ||
@@ -104,10 +82,2 @@ * @returns {string|null} | ||
/** | ||
* Specify True, to send a Pay button.NOTE: This type of button must always be the first button in the first row. | ||
* @returns {boolean|null} | ||
*/ | ||
get pay() { | ||
return this._pay | ||
} | ||
/** | ||
* | ||
@@ -121,8 +91,6 @@ * @param {Object} raw | ||
raw['url'] ? raw['url'] : null, | ||
raw['login_url'] ? LoginUrl.deserialize(raw['login_url']) : null, | ||
raw['callback_data'] ? raw['callback_data'] : null, | ||
raw['switch_inline_query'] ? raw['switch_inline_query'] : null, | ||
raw['switch_inline_query_current_chat'] ? raw['switch_inline_query_current_chat'] : null, | ||
raw['callback_game'] ? CallbackGame.deserialize(raw['callback_game']) : null, | ||
raw['pay'] ? raw['pay'] : null | ||
raw['callback_game'] ? CallbackGame.deserialize(raw['callback_game']) : null | ||
) | ||
@@ -139,8 +107,6 @@ } | ||
url: this.url ? this.url : undefined, | ||
login_url: this.loginUrl ? this.loginUrl.serialize() : undefined, | ||
callback_data: this.callbackData ? this.callbackData : undefined, | ||
switch_inline_query: this.switchInlineQuery ? this.switchInlineQuery : undefined, | ||
switch_inline_query_current_chat: this.switchInlineQueryCurrentChat ? this.switchInlineQueryCurrentChat : undefined, | ||
callback_game: this.callbackGame ? this.callbackGame.serialize() : undefined, | ||
pay: this.pay ? this.pay : undefined | ||
callback_game: this.callbackGame ? this.callbackGame.serialize() : undefined | ||
} | ||
@@ -147,0 +113,0 @@ } |
{ | ||
"_from": "limber-api-node-telegram", | ||
"_id": "limber-api-node-telegram@1.0.1", | ||
"_id": "limber-api-node-telegram@1.0.2", | ||
"_inBundle": false, | ||
@@ -61,6 +61,5 @@ "_integrity": "sha1-H1Zay+iZJbASdlZgZpbYdhvqGQc=", | ||
"scripts": { | ||
"prepublish": "node api-scheme/GenerateTGModels.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"version": "1.0.1" | ||
"version": "1.0.2" | ||
} |
440924
14476