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

This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. https://core.telegram.org/bots/api#keyboardbuttonpolltype. More...

#include <KeyboardButtonPollType.hpp>

Public Member Functions

 KeyboardButtonPollType ()=default
 
 KeyboardButtonPollType (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 type
 Optional. “quiz“ or “regular“. If “quiz“ is passed, the user will be allowed to create only polls in the quiz mode. If “regular“ is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. More...
 

Detailed Description

This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. https://core.telegram.org/bots/api#keyboardbuttonpolltype.

Definition at line 7 of file KeyboardButtonPollType.hpp.

Constructor & Destructor Documentation

◆ KeyboardButtonPollType() [1/2]

tgbotxx::KeyboardButtonPollType::KeyboardButtonPollType ( )
default

◆ KeyboardButtonPollType() [2/2]

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

Definition at line 9 of file KeyboardButtonPollType.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 28 of file KeyboardButtonPollType.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 21 of file KeyboardButtonPollType.hpp.

Member Data Documentation

◆ type

std::string tgbotxx::KeyboardButtonPollType::type

Optional. “quiz“ or “regular“. If “quiz“ is passed, the user will be allowed to create only polls in the quiz mode. If “regular“ is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.

Definition at line 16 of file KeyboardButtonPollType.hpp.


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