tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::MenuButtonWebApp Struct Reference

Represents a menu button, which launches a Web App. https://core.telegram.org/bots/webapps https://core.telegram.org/bots/api#menubuttonwebapp. More...

#include <MenuButton.hpp>

Inheritance diagram for tgbotxx::MenuButtonWebApp:
tgbotxx::MenuButton

Public Member Functions

 MenuButtonWebApp ()
 
 MenuButtonWebApp (const nl::json &json)
 
nl::json toJson () const override
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json) override
 Deserializes this object from JSON. More...
 
- Public Member Functions inherited from tgbotxx::MenuButton
 MenuButton ()=default
 
 MenuButton (const nl::json &json)
 
virtual ~MenuButton ()=default
 

Public Attributes

std::string text
 Text on the button. More...
 
Ptr< WebAppInfowebApp
 Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. https://core.telegram.org/bots/api#answerwebappquery. More...
 
- Public Attributes inherited from tgbotxx::MenuButton
std::string type
 Type of the button. More...
 

Detailed Description

Represents a menu button, which launches a Web App. https://core.telegram.org/bots/webapps https://core.telegram.org/bots/api#menubuttonwebapp.

Definition at line 56 of file MenuButton.hpp.

Constructor & Destructor Documentation

◆ MenuButtonWebApp() [1/2]

tgbotxx::MenuButtonWebApp::MenuButtonWebApp ( )
inline

Definition at line 57 of file MenuButton.hpp.

◆ MenuButtonWebApp() [2/2]

tgbotxx::MenuButtonWebApp::MenuButtonWebApp ( const nl::json &  json)
inlineexplicit

Definition at line 60 of file MenuButton.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::MenuButtonWebApp::fromJson ( const nl::json &  json)
inlineoverridevirtual

Deserializes this object from JSON.

Reimplemented from tgbotxx::MenuButton.

Definition at line 78 of file MenuButton.hpp.

◆ toJson()

nl::json tgbotxx::MenuButtonWebApp::toJson ( ) const
inlineoverridevirtual

Serializes this object to JSON.

Returns
JSON representation of this object

Reimplemented from tgbotxx::MenuButton.

Definition at line 71 of file MenuButton.hpp.

Member Data Documentation

◆ text

std::string tgbotxx::MenuButtonWebApp::text

Text on the button.

Definition at line 65 of file MenuButton.hpp.

◆ webApp

Ptr<WebAppInfo> tgbotxx::MenuButtonWebApp::webApp

Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. https://core.telegram.org/bots/api#answerwebappquery.

Definition at line 69 of file MenuButton.hpp.


The documentation for this struct was generated from the following file: