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

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo. https://core.telegram.org/bots/api#inlinequeryresultphoto. More...

#include <InlineQueryResult.hpp>

Inheritance diagram for tgbotxx::InlineQueryResultPhoto:
tgbotxx::InlineQueryResult

Public Member Functions

 InlineQueryResultPhoto ()
 
 InlineQueryResultPhoto (const nl::json &json)
 
nl::json toJson () const override
 
void fromJson (const nl::json &json) override
 
- Public Member Functions inherited from tgbotxx::InlineQueryResult
 InlineQueryResult ()=default
 
 InlineQueryResult (const nl::json &json)
 

Public Attributes

std::string photoUrl
 A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB. More...
 
std::string thumbnailUrl
 URL of the thumbnail for the photo. More...
 
std::int32_t photoWidth {}
 Optional. Width of the photo. More...
 
std::int32_t photoHeight {}
 Optional. Height of the photo. More...
 
std::string title
 Optional. Title for the result. More...
 
std::string description
 Optional. Short description of the result. More...
 
std::string caption
 Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing. More...
 
std::string parseMode
 Optional. Mode for parsing entities in the photo caption. See 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...
 
Ptr< InputMessageContentinputMessageContent
 Optional. Content of the message to be sent instead of the photo. More...
 
- Public Attributes inherited from tgbotxx::InlineQueryResult
std::string type
 Type of the result. More...
 
std::string id
 Unique identifier for this result, 1-64 bytes. More...
 
Ptr< InlineKeyboardMarkupreplyMarkup
 Optional. Inline keyboard attached to the message. More...
 

Detailed Description

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo. https://core.telegram.org/bots/api#inlinequeryresultphoto.

Definition at line 131 of file InlineQueryResult.hpp.

Constructor & Destructor Documentation

◆ InlineQueryResultPhoto() [1/2]

tgbotxx::InlineQueryResultPhoto::InlineQueryResultPhoto ( )
inline

Definition at line 132 of file InlineQueryResult.hpp.

◆ InlineQueryResultPhoto() [2/2]

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

Definition at line 135 of file InlineQueryResult.hpp.

Member Function Documentation

◆ fromJson()

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

Reimplemented from tgbotxx::InlineQueryResult.

Definition at line 184 of file InlineQueryResult.hpp.

◆ toJson()

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

Reimplemented from tgbotxx::InlineQueryResult.

Definition at line 169 of file InlineQueryResult.hpp.

Member Data Documentation

◆ caption

std::string tgbotxx::InlineQueryResultPhoto::caption

Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing.

Definition at line 158 of file InlineQueryResult.hpp.

◆ captionEntities

std::vector<Ptr<MessageEntity> > tgbotxx::InlineQueryResultPhoto::captionEntities

Optional. List of special entities that appear in the caption, which can be specified instead of parseMode.

Definition at line 164 of file InlineQueryResult.hpp.

◆ description

std::string tgbotxx::InlineQueryResultPhoto::description

Optional. Short description of the result.

Definition at line 155 of file InlineQueryResult.hpp.

◆ inputMessageContent

Ptr<InputMessageContent> tgbotxx::InlineQueryResultPhoto::inputMessageContent

Optional. Content of the message to be sent instead of the photo.

Definition at line 167 of file InlineQueryResult.hpp.

◆ parseMode

std::string tgbotxx::InlineQueryResultPhoto::parseMode

Optional. Mode for parsing entities in the photo caption. See formatting options for more details.

Definition at line 161 of file InlineQueryResult.hpp.

◆ photoHeight

std::int32_t tgbotxx::InlineQueryResultPhoto::photoHeight {}

Optional. Height of the photo.

Definition at line 149 of file InlineQueryResult.hpp.

◆ photoUrl

std::string tgbotxx::InlineQueryResultPhoto::photoUrl

A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB.

Definition at line 140 of file InlineQueryResult.hpp.

◆ photoWidth

std::int32_t tgbotxx::InlineQueryResultPhoto::photoWidth {}

Optional. Width of the photo.

Definition at line 146 of file InlineQueryResult.hpp.

◆ thumbnailUrl

std::string tgbotxx::InlineQueryResultPhoto::thumbnailUrl

URL of the thumbnail for the photo.

Definition at line 143 of file InlineQueryResult.hpp.

◆ title

std::string tgbotxx::InlineQueryResultPhoto::title

Optional. Title for the result.

Definition at line 152 of file InlineQueryResult.hpp.


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