Add inline query result document types documentation

bot-api-6.1
Ilya Kaznacheev 2020-10-24 23:07:01 +03:00
parent 515002232b
commit ea8eadd3c8
No known key found for this signature in database
GPG Key ID: 7E2C1D8A4AB37D50
1 changed files with 86 additions and 21 deletions

View File

@ -1342,30 +1342,95 @@ type InlineQueryResultCachedVoice struct {
// InlineQueryResultDocument is an inline query response document. // InlineQueryResultDocument is an inline query response document.
type InlineQueryResultDocument struct { type InlineQueryResultDocument struct {
Type string `json:"type"` // required // Type of the result, must be document
ID string `json:"id"` // required //
Title string `json:"title"` // required // required
Type string `json:"type"`
// ID unique identifier for this result, 1-64 bytes
//
// required
ID string `json:"id"`
// Title for the result
//
// required
Title string `json:"title"`
// Caption of the document to be sent, 0-1024 characters after entities parsing
//
// optional
Caption string `json:"caption"` Caption string `json:"caption"`
URL string `json:"document_url"` // required // URL a valid url for the file
MimeType string `json:"mime_type"` // required //
// required
URL string `json:"document_url"`
// MimeType of the content of the file, either “application/pdf” or “application/zip”
//
// required
MimeType string `json:"mime_type"`
// Description short description of the result
//
// optional
Description string `json:"description"` Description string `json:"description"`
// ReplyMarkup nline keyboard attached to the message
//
// optional
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// InputMessageContent content of the message to be sent instead of the file
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"` InputMessageContent interface{} `json:"input_message_content,omitempty"`
// ThumbURL url of the thumbnail (jpeg only) for the file
//
// optional
ThumbURL string `json:"thumb_url"` ThumbURL string `json:"thumb_url"`
// ThumbWidth thumbnail width
//
// optional
ThumbWidth int `json:"thumb_width"` ThumbWidth int `json:"thumb_width"`
// ThumbHeight thumbnail height
//
// optional
ThumbHeight int `json:"thumb_height"` ThumbHeight int `json:"thumb_height"`
} }
// InlineQueryResultCachedDocument is an inline query response with cached document. // InlineQueryResultCachedDocument is an inline query response with cached document.
type InlineQueryResultCachedDocument struct { type InlineQueryResultCachedDocument struct {
Type string `json:"type"` // required // Type of the result, must be document
ID string `json:"id"` // required //
DocumentID string `json:"document_file_id"` // required // required
Type string `json:"type"`
// ID unique identifier for this result, 1-64 bytes
//
// required
ID string `json:"id"`
// DocumentID a valid file identifier for the file
//
// required
DocumentID string `json:"document_file_id"`
// Title for the result
//
// optional
Title string `json:"title"` // required Title string `json:"title"` // required
// Caption of the document to be sent, 0-1024 characters after entities parsing
//
// optional
Caption string `json:"caption"` Caption string `json:"caption"`
// Description short description of the result
//
// optional
Description string `json:"description"` Description string `json:"description"`
// ParseMode mode for parsing entities in the video caption.
// // See formatting options for more details
// // (https://core.telegram.org/bots/api#formatting-options).
//
// optional
ParseMode string `json:"parse_mode"` ParseMode string `json:"parse_mode"`
// ReplyMarkup inline keyboard attached to the message
//
// optional
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// InputMessageContent content of the message to be sent instead of the file
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"` InputMessageContent interface{} `json:"input_message_content,omitempty"`
} }