tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::PaidMediaPreview Struct Reference

The paid media isn't available before the payment. https://core.telegram.org/bots/api#paidmediapreview. More...

#include <PaidMedia.hpp>

Inheritance diagram for tgbotxx::PaidMediaPreview:
tgbotxx::PaidMedia

Public Member Functions

 PaidMediaPreview ()
 
 PaidMediaPreview (const nl::json &json)
 
nl::json toJson () const override
 Serializes this object to JSON.
 
void fromJson (const nl::json &json) override
 Deserializes this object from JSON.
 
- Public Member Functions inherited from tgbotxx::PaidMedia
 PaidMedia ()=default
 
 PaidMedia (const nl::json &json)
 
virtual ~PaidMedia ()=default
 

Public Attributes

std::int32_t width {}
 Optional. Media width as defined by the sender.
 
std::int32_t height {}
 Optional. Media height as defined by the sender.
 
std::int32_t duration {}
 Optional. Duration of the media in seconds as defined by the sender.
 
- Public Attributes inherited from tgbotxx::PaidMedia
std::string type
 Type of the paid media, one of "preview", "photo" or "video".
 

Detailed Description

The paid media isn't available before the payment. https://core.telegram.org/bots/api#paidmediapreview.

Definition at line 43 of file PaidMedia.hpp.

Constructor & Destructor Documentation

◆ PaidMediaPreview() [1/2]

tgbotxx::PaidMediaPreview::PaidMediaPreview ( )
inline

Definition at line 44 of file PaidMedia.hpp.

◆ PaidMediaPreview() [2/2]

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

Definition at line 47 of file PaidMedia.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::PaidMediaPreview::fromJson ( const nl::json &  json)
inlineoverridevirtual

Deserializes this object from JSON.

Reimplemented from tgbotxx::PaidMedia.

Definition at line 68 of file PaidMedia.hpp.

◆ toJson()

nl::json tgbotxx::PaidMediaPreview::toJson ( ) const
inlineoverridevirtual

Serializes this object to JSON.

Returns
JSON representation of this object

Reimplemented from tgbotxx::PaidMedia.

Definition at line 60 of file PaidMedia.hpp.

Member Data Documentation

◆ duration

std::int32_t tgbotxx::PaidMediaPreview::duration {}

Optional. Duration of the media in seconds as defined by the sender.

Definition at line 58 of file PaidMedia.hpp.

◆ height

std::int32_t tgbotxx::PaidMediaPreview::height {}

Optional. Media height as defined by the sender.

Definition at line 55 of file PaidMedia.hpp.

◆ width

std::int32_t tgbotxx::PaidMediaPreview::width {}

Optional. Media width as defined by the sender.

Definition at line 52 of file PaidMedia.hpp.


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