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

This object contains information about one answer option in a poll. https://core.telegram.org/bots/api#polloption. More...

#include <PollOption.hpp>

Public Member Functions

 PollOption ()=default
 
 PollOption (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
 Option text, 1-100 characters. More...
 
std::int32_t voterCount {}
 Number of users that voted for this option. More...
 

Detailed Description

This object contains information about one answer option in a poll. https://core.telegram.org/bots/api#polloption.

Definition at line 7 of file PollOption.hpp.

Constructor & Destructor Documentation

◆ PollOption() [1/2]

tgbotxx::PollOption::PollOption ( )
default

◆ PollOption() [2/2]

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

Definition at line 9 of file PollOption.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 29 of file PollOption.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 21 of file PollOption.hpp.

Member Data Documentation

◆ text

std::string tgbotxx::PollOption::text

Option text, 1-100 characters.

Definition at line 14 of file PollOption.hpp.

◆ voterCount

std::int32_t tgbotxx::PollOption::voterCount {}

Number of users that voted for this option.

Definition at line 17 of file PollOption.hpp.


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