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

This object contains information about a chat boost. https://core.telegram.org/bots/api#chatboost. More...

#include <ChatBoost.hpp>

Public Member Functions

 ChatBoost ()=default
 
 ChatBoost (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 boostId
 Unique identifier of the boost. More...
 
std::time_t addDate {}
 Point in time (Unix timestamp) when the chat was boosted. More...
 
std::time_t expirationDate {}
 Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged. More...
 
Ptr< ChatBoostSourcesource
 Source of the added boost. More...
 

Detailed Description

This object contains information about a chat boost. https://core.telegram.org/bots/api#chatboost.

Definition at line 8 of file ChatBoost.hpp.

Constructor & Destructor Documentation

◆ ChatBoost() [1/2]

tgbotxx::ChatBoost::ChatBoost ( )
default

◆ ChatBoost() [2/2]

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

Definition at line 10 of file ChatBoost.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 39 of file ChatBoost.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 29 of file ChatBoost.hpp.

Member Data Documentation

◆ addDate

std::time_t tgbotxx::ChatBoost::addDate {}

Point in time (Unix timestamp) when the chat was boosted.

Definition at line 18 of file ChatBoost.hpp.

◆ boostId

std::string tgbotxx::ChatBoost::boostId

Unique identifier of the boost.

Definition at line 15 of file ChatBoost.hpp.

◆ expirationDate

std::time_t tgbotxx::ChatBoost::expirationDate {}

Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged.

Definition at line 21 of file ChatBoost.hpp.

◆ source

Ptr<ChatBoostSource> tgbotxx::ChatBoost::source

Source of the added boost.

Definition at line 24 of file ChatBoost.hpp.


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