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

Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method. More...

#include <InlineQueryResult.hpp>

Inheritance diagram for tgbotxx::InlineQueryResultDocument:
tgbotxx::InlineQueryResult

Public Member Functions

 InlineQueryResultDocument ()
 
 InlineQueryResultDocument (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 title
 Title for the result. More...
 
std::string caption
 Optional. Caption of the document to be sent, 0-1024 characters after entities parsing. More...
 
std::string parseMode
 Optional. Mode for parsing entities in the document 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...
 
std::string documentUrl
 A valid URL for the file. More...
 
std::string mimeType
 MIME type of the content of the file, either “application/pdf” or “application/zip” More...
 
std::string description
 Optional. Short description of the result. More...
 
Ptr< InputMessageContentinputMessageContent
 Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video). More...
 
std::string thumbnailUrl
 Optional. URL of the thumbnail (JPEG only) for the file. More...
 
std::int32_t thumbnailWidth {}
 Optional. Thumbnail width;. More...
 
std::int32_t thumbnailHeight {}
 Optional. Thumbnail height;. 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 file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.

Note
: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

Definition at line 568 of file InlineQueryResult.hpp.

Constructor & Destructor Documentation

◆ InlineQueryResultDocument() [1/2]

tgbotxx::InlineQueryResultDocument::InlineQueryResultDocument ( )
inline

Definition at line 569 of file InlineQueryResult.hpp.

◆ InlineQueryResultDocument() [2/2]

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

Definition at line 572 of file InlineQueryResult.hpp.

Member Function Documentation

◆ fromJson()

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

Reimplemented from tgbotxx::InlineQueryResult.

Definition at line 626 of file InlineQueryResult.hpp.

◆ toJson()

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

Reimplemented from tgbotxx::InlineQueryResult.

Definition at line 610 of file InlineQueryResult.hpp.

Member Data Documentation

◆ caption

std::string tgbotxx::InlineQueryResultDocument::caption

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

Definition at line 580 of file InlineQueryResult.hpp.

◆ captionEntities

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

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

Definition at line 586 of file InlineQueryResult.hpp.

◆ description

std::string tgbotxx::InlineQueryResultDocument::description

Optional. Short description of the result.

Definition at line 595 of file InlineQueryResult.hpp.

◆ documentUrl

std::string tgbotxx::InlineQueryResultDocument::documentUrl

A valid URL for the file.

Definition at line 589 of file InlineQueryResult.hpp.

◆ inputMessageContent

Ptr<InputMessageContent> tgbotxx::InlineQueryResultDocument::inputMessageContent

Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).

Definition at line 599 of file InlineQueryResult.hpp.

◆ mimeType

std::string tgbotxx::InlineQueryResultDocument::mimeType

MIME type of the content of the file, either “application/pdf” or “application/zip”

Definition at line 592 of file InlineQueryResult.hpp.

◆ parseMode

std::string tgbotxx::InlineQueryResultDocument::parseMode

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

Definition at line 583 of file InlineQueryResult.hpp.

◆ thumbnailHeight

std::int32_t tgbotxx::InlineQueryResultDocument::thumbnailHeight {}

Optional. Thumbnail height;.

Definition at line 608 of file InlineQueryResult.hpp.

◆ thumbnailUrl

std::string tgbotxx::InlineQueryResultDocument::thumbnailUrl

Optional. URL of the thumbnail (JPEG only) for the file.

Definition at line 602 of file InlineQueryResult.hpp.

◆ thumbnailWidth

std::int32_t tgbotxx::InlineQueryResultDocument::thumbnailWidth {}

Optional. Thumbnail width;.

Definition at line 605 of file InlineQueryResult.hpp.

◆ title

std::string tgbotxx::InlineQueryResultDocument::title

Title for the result.

Definition at line 577 of file InlineQueryResult.hpp.


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