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

This object describes paid media. Currently, it can be one of: More...

#include <PaidMedia.hpp>

Inheritance diagram for tgbotxx::PaidMedia:
tgbotxx::PaidMediaPhoto tgbotxx::PaidMediaPreview tgbotxx::PaidMediaVideo

Public Member Functions

 PaidMedia ()=default
 
 PaidMedia (const nl::json &json)
 
virtual ~PaidMedia ()=default
 
virtual nl::json toJson () const
 Serializes this object to JSON.
 
virtual void fromJson (const nl::json &json)
 Deserializes this object from JSON.
 

Public Attributes

std::string type
 Type of the paid media, one of "preview", "photo" or "video".
 

Detailed Description

This object describes paid media. Currently, it can be one of:

Definition at line 12 of file PaidMedia.hpp.

Constructor & Destructor Documentation

◆ PaidMedia() [1/2]

tgbotxx::PaidMedia::PaidMedia ( )
default

◆ PaidMedia() [2/2]

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

Definition at line 14 of file PaidMedia.hpp.

◆ ~PaidMedia()

virtual tgbotxx::PaidMedia::~PaidMedia ( )
virtualdefault

Member Function Documentation

◆ fromJson()

virtual void tgbotxx::PaidMedia::fromJson ( const nl::json &  json)
inlinevirtual

Deserializes this object from JSON.

Reimplemented in tgbotxx::PaidMediaPreview, tgbotxx::PaidMediaPhoto, and tgbotxx::PaidMediaVideo.

Definition at line 31 of file PaidMedia.hpp.

◆ toJson()

virtual nl::json tgbotxx::PaidMedia::toJson ( ) const
inlinevirtual

Serializes this object to JSON.

Returns
JSON representation of this object

Reimplemented in tgbotxx::PaidMediaPreview, tgbotxx::PaidMediaPhoto, and tgbotxx::PaidMediaVideo.

Definition at line 24 of file PaidMedia.hpp.

Member Data Documentation

◆ type

std::string tgbotxx::PaidMedia::type

Type of the paid media, one of "preview", "photo" or "video".

Definition at line 20 of file PaidMedia.hpp.


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