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

This object represents a button to be shown above inline query results. You must use exactly one of the optional fields. https://core.telegram.org/bots/api#inlinequeryresultsbutton. More...

#include <InlineQueryResultsButton.hpp>

Public Member Functions

 InlineQueryResultsButton ()=default
 
 InlineQueryResultsButton (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::string text
 Label text on the button. More...
 
Ptr< WebAppInfowebApp
 Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App. More...
 
std::string startParameter
 Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. More...
 

Detailed Description

This object represents a button to be shown above inline query results. You must use exactly one of the optional fields. https://core.telegram.org/bots/api#inlinequeryresultsbutton.

Definition at line 9 of file InlineQueryResultsButton.hpp.

Constructor & Destructor Documentation

◆ InlineQueryResultsButton() [1/2]

tgbotxx::InlineQueryResultsButton::InlineQueryResultsButton ( )
default

◆ InlineQueryResultsButton() [2/2]

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

Definition at line 11 of file InlineQueryResultsButton.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::InlineQueryResultsButton::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 41 of file InlineQueryResultsButton.hpp.

◆ toJson()

nl::json tgbotxx::InlineQueryResultsButton::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 32 of file InlineQueryResultsButton.hpp.

Member Data Documentation

◆ startParameter

std::string tgbotxx::InlineQueryResultsButton::startParameter

Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.

Definition at line 28 of file InlineQueryResultsButton.hpp.

◆ text

std::string tgbotxx::InlineQueryResultsButton::text

Label text on the button.

Definition at line 16 of file InlineQueryResultsButton.hpp.

◆ webApp

Ptr<WebAppInfo> tgbotxx::InlineQueryResultsButton::webApp

Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App.

Definition at line 20 of file InlineQueryResultsButton.hpp.


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