Cppgram  1.0.0
Easy and modern C++14 Telegram Bot API wrapper
Public Member Functions | Public Attributes | List of all members
KeyboardButton Class Reference

Class for creating Inline keyboard json_button. More...

#include <keyboard_button.hpp>

Public Member Functions

 KeyboardButton (const std::string &text, const std::string &data, const EButton &button_type)
 Constructor by parameters. More...
 
 KeyboardButton (Json::Value &json_button)
 Constructor by JSON. More...
 

Public Attributes

std::string text
 Label text of the json_button.
 
std::string data
 Data of the json_button (depends on type)
 
EButton button_type
 Type of the json_button.
 

Detailed Description

Class for creating Inline keyboard json_button.

This object represents one json_button of an inline keyboard, used in Keyboard. (https://core.telegram.org/bots/api#inlinekeyboardbutton)

Constructor & Destructor Documentation

◆ KeyboardButton() [1/2]

KeyboardButton ( const std::string &  text,
const std::string &  data,
const EButton button_type 
)
inline

Constructor by parameters.

Parameters
textLabel text of the json_button
dataData of the json_button (depends on the type)
button_typeType of the json_button to create
Returns
Returns a new inlineKeyboardButton

◆ KeyboardButton() [2/2]

KeyboardButton ( Json::Value &  json_button)
inline

Constructor by JSON.

Parameters
json_buttonJSON-serialized button
Returns
Returns a new inlineKeyboardButton

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