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

Represents an audio file to be treated as music to be sent. https://core.telegram.org/bots/api#inputmediaaudio. More...

#include <InputMedia.hpp>

Inheritance diagram for tgbotxx::InputMediaAudio:
tgbotxx::InputMedia

Public Member Functions

 InputMediaAudio ()
 
 InputMediaAudio (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

std::string thumbnail
 Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files » https://core.telegram.org/bots/api#sending-files. More...
 
std::int32_t duration {}
 Optional. Duration of the audio in seconds. More...
 
std::string performer
 Optional. Performer of the audio. More...
 
std::string title
 Optional. Title of the audio. 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 an audio file to be treated as music to be sent. https://core.telegram.org/bots/api#inputmediaaudio.

Definition at line 162 of file InputMedia.hpp.

Constructor & Destructor Documentation

◆ InputMediaAudio() [1/2]

tgbotxx::InputMediaAudio::InputMediaAudio ( )
inline

Definition at line 163 of file InputMedia.hpp.

◆ InputMediaAudio() [2/2]

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

Definition at line 166 of file InputMedia.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Reimplemented from tgbotxx::InputMedia.

Definition at line 194 of file InputMedia.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Reimplemented from tgbotxx::InputMedia.

Definition at line 186 of file InputMedia.hpp.

Member Data Documentation

◆ duration

std::int32_t tgbotxx::InputMediaAudio::duration {}

Optional. Duration of the audio in seconds.

Definition at line 178 of file InputMedia.hpp.

◆ performer

std::string tgbotxx::InputMediaAudio::performer

Optional. Performer of the audio.

Definition at line 181 of file InputMedia.hpp.

◆ thumbnail

std::string tgbotxx::InputMediaAudio::thumbnail

Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files » https://core.telegram.org/bots/api#sending-files.

Definition at line 175 of file InputMedia.hpp.

◆ title

std::string tgbotxx::InputMediaAudio::title

Optional. Title of the audio.

Definition at line 184 of file InputMedia.hpp.


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