summaryrefslogtreecommitdiff
path: root/include/tgbot
diff options
context:
space:
mode:
authornitanmarcel <nitan.marcel@protonmail.com>2019-11-19 21:59:22 +0200
committernitanmarcel <nitan.marcel@protonmail.com>2019-11-19 21:59:22 +0200
commiteb10c8705be495cc9d663dd48672eb9e174f0e4c (patch)
treeb090dad39242f60a0915c139ee9161514f5753e6 /include/tgbot
parent23553bc251ca673137b684082a6f84062f053bd2 (diff)
API 4.3
Diffstat (limited to 'include/tgbot')
-rw-r--r--include/tgbot/types/InlineKeyboardButton.h6
-rw-r--r--include/tgbot/types/LoginUrl.h45
-rw-r--r--include/tgbot/types/Message.h6
3 files changed, 57 insertions, 0 deletions
diff --git a/include/tgbot/types/InlineKeyboardButton.h b/include/tgbot/types/InlineKeyboardButton.h
index 4b83087..f02d788 100644
--- a/include/tgbot/types/InlineKeyboardButton.h
+++ b/include/tgbot/types/InlineKeyboardButton.h
@@ -9,6 +9,7 @@
#include <memory>
#include "tgbot/types/CallbackGame.h"
+#include "tgbot/types/LoginUrl.h"
namespace TgBot {
@@ -32,6 +33,11 @@ public:
std::string url;
/**
+ * @brief Optional. An HTTP URL used to automatically authorize the user.
+ */
+ LoginUrl::Ptr loginUrl;
+
+ /**
* @brief Optional. Data to be sent in a callback query to the bot when button is pressed.
*/
std::string callbackData;
diff --git a/include/tgbot/types/LoginUrl.h b/include/tgbot/types/LoginUrl.h
new file mode 100644
index 0000000..1627399
--- /dev/null
+++ b/include/tgbot/types/LoginUrl.h
@@ -0,0 +1,45 @@
+//
+// Created by alexandrumarcel on 19.11.2019.
+//
+
+#ifndef TGBOT_CPP_LOGINURL_H
+#define TGBOT_CPP_LOGINURL_H
+
+#include <memory>
+#include <string>
+#include <vector>
+
+
+namespace TgBot{
+ /**
+ * @brief This object represents a Poll.
+ *
+ * @ingroup types
+ */
+ class LoginUrl{
+ public:
+ typedef std::shared_ptr<LoginUrl> Ptr;
+
+ /**
+ * @brief UAn HTTP URL to be opened with user authorization data added to the query string when the button is pressed..
+ */
+ std::string url;
+
+ /**
+ * @brief Optional. New text of the button in forwarded messages.
+ */
+ std::string forward_text;
+
+ /**
+ * @brief Optional. Username of a bot, which will be used for user authorization.
+ */
+ std::string bot_username;
+
+ /**
+ * @brief Optional. Pass True to request the permission for your bot to send messages to the user.
+ */
+ bool request_write_access;
+ };
+}
+
+#endif //TGBOT_CPP_LOGINURL_H
diff --git a/include/tgbot/types/Message.h b/include/tgbot/types/Message.h
index 4b7ce59..9e831bc 100644
--- a/include/tgbot/types/Message.h
+++ b/include/tgbot/types/Message.h
@@ -45,6 +45,7 @@
#include "tgbot/types/Voice.h"
#include "tgbot/types/Invoice.h"
#include "tgbot/types/SuccessfulPayment.h"
+#include "tgbot/types/InlineKeyboardMarkup.h"
namespace TgBot {
@@ -278,6 +279,11 @@ public:
* @brief Optional. The domain name of the website on which the user has logged in.
*/
std::string connectedWebsite;
+
+ /**
+ * @brief Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
+ */
+ InlineKeyboardMarkup::Ptr replyMarkup;
};
}