class InlineQueryResultDocument implements InlineQueryResultInterface

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

Methods

__construct(string $type, string $id, string $title, string $document_url, string $mime_type, string|null $caption = null, string|null $parse_mode = null, MessageEntity[]|null $caption_entities = null, string|null $description = null, InlineKeyboardMarkup|null $reply_markup = null, InputMessageContentInterface|null $input_message_content = null, string|null $thumb_url = null, int|null $thumb_width = null, int|null $thumb_height = null)

No description

string
getType()

Type of the result, must be document.

string
getId()

Unique identifier for this result, 1-64 bytes.

string
getTitle()

Title for the result.

string
getDocumentUrl()

A valid URL for the file.

string
getMimeType()

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

string|null
getCaption()

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

string|null
getParseMode()

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

array|null
getCaptionEntities()

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

string|null
getDescription()

Optional. Short description of the result.

InlineKeyboardMarkup|null
getReplyMarkup()

Optional. Inline keyboard attached to the message.

InputMessageContentInterface|null
getInputMessageContent()

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

string|null
getThumbUrl()

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

int|null
getThumbWidth()

Optional. Thumbnail width.

int|null
getThumbHeight()

Optional. Thumbnail height.

Details

at line 26
__construct(string $type, string $id, string $title, string $document_url, string $mime_type, string|null $caption = null, string|null $parse_mode = null, MessageEntity[]|null $caption_entities = null, string|null $description = null, InlineKeyboardMarkup|null $reply_markup = null, InputMessageContentInterface|null $input_message_content = null, string|null $thumb_url = null, int|null $thumb_width = null, int|null $thumb_height = null)

No description

Parameters

string $type
string $id
string $title
string $document_url
string $mime_type
string|null $caption
string|null $parse_mode
MessageEntity[]|null $caption_entities
string|null $description
InlineKeyboardMarkup|null $reply_markup
InputMessageContentInterface|null $input_message_content
string|null $thumb_url
int|null $thumb_width
int|null $thumb_height

at line 47
string getType()

Type of the result, must be document.

Return Value

string

at line 55
string getId()

Unique identifier for this result, 1-64 bytes.

Return Value

string

at line 63
string getTitle()

Title for the result.

Return Value

string

at line 71
string getDocumentUrl()

A valid URL for the file.

Return Value

string

at line 79
string getMimeType()

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

Return Value

string

at line 87
string|null getCaption()

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

Return Value

string|null

at line 95
string|null getParseMode()

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

Return Value

string|null

at line 105
array|null getCaptionEntities()

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

Return Value

array|null

at line 113
string|null getDescription()

Optional. Short description of the result.

Return Value

string|null

at line 121
InlineKeyboardMarkup|null getReplyMarkup()

Optional. Inline keyboard attached to the message.

Return Value

InlineKeyboardMarkup|null

at line 129
InputMessageContentInterface|null getInputMessageContent()

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

Return Value

InputMessageContentInterface|null

at line 137
string|null getThumbUrl()

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

Return Value

string|null

at line 145
int|null getThumbWidth()

Optional. Thumbnail width.

Return Value

int|null

at line 153
int|null getThumbHeight()

Optional. Thumbnail height.

Return Value

int|null