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

Represents a photo to be sent. https://core.telegram.org/bots/api#inputmediaphoto. More...

#include <InputMedia.hpp>

Inheritance diagram for tgbotxx::InputMediaPhoto:
tgbotxx::InputMedia

Public Member Functions

 InputMediaPhoto ()
 
 InputMediaPhoto (const nl::json &json)
 
nl::json toJson () const override
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json) override
 Deserializes this object from JSON. More...
 
- Public Member Functions inherited from tgbotxx::InputMedia
 InputMedia ()=default
 
 InputMedia (const nl::json &json)
 

Public Attributes

bool hasSpoiler {}
 Optional. Pass True if the photo needs to be covered with a spoiler animation. More...
 
- Public Attributes inherited from tgbotxx::InputMedia
std::string type
 Type of the result. More...
 
std::variant< cpr::File, std::string > media {""}
 File to send. More...
 
std::string caption
 Optional. Caption of the media to be sent, 0-1024 characters after entities parsing. More...
 
std::string parseMode
 Optional. Mode for parsing entities in the media caption. See https://core.telegram.org/bots/api#formatting-options for more details. More...
 
std::vector< Ptr< MessageEntity > > captionEntities
 Optional. List of special entities that appear in the caption, which can be specified instead of parseMode. More...
 

Detailed Description

Represents a photo to be sent. https://core.telegram.org/bots/api#inputmediaphoto.

Definition at line 206 of file InputMedia.hpp.

Constructor & Destructor Documentation

◆ InputMediaPhoto() [1/2]

tgbotxx::InputMediaPhoto::InputMediaPhoto ( )
inline

Definition at line 207 of file InputMedia.hpp.

◆ InputMediaPhoto() [2/2]

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

Definition at line 210 of file InputMedia.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Reimplemented from tgbotxx::InputMedia.

Definition at line 222 of file InputMedia.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Reimplemented from tgbotxx::InputMedia.

Definition at line 217 of file InputMedia.hpp.

Member Data Documentation

◆ hasSpoiler

bool tgbotxx::InputMediaPhoto::hasSpoiler {}

Optional. Pass True if the photo needs to be covered with a spoiler animation.

Definition at line 215 of file InputMedia.hpp.


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