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

107
types.go
View File

@ -1342,31 +1342,96 @@ 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
Caption string `json:"caption"` Type string `json:"type"`
URL string `json:"document_url"` // required // ID unique identifier for this result, 1-64 bytes
MimeType string `json:"mime_type"` // required //
Description string `json:"description"` // required
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ID string `json:"id"`
InputMessageContent interface{} `json:"input_message_content,omitempty"` // Title for the result
ThumbURL string `json:"thumb_url"` //
ThumbWidth int `json:"thumb_width"` // required
ThumbHeight int `json:"thumb_height"` Title string `json:"title"`
// Caption of the document to be sent, 0-1024 characters after entities parsing
//
// optional
Caption string `json:"caption"`
// URL a valid url for the file
//
// 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"`
// ReplyMarkup nline keyboard attached to the message
//
// optional
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"`
// ThumbURL url of the thumbnail (jpeg only) for the file
//
// optional
ThumbURL string `json:"thumb_url"`
// ThumbWidth thumbnail width
//
// optional
ThumbWidth int `json:"thumb_width"`
// ThumbHeight thumbnail height
//
// optional
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
Title string `json:"title"` // required Type string `json:"type"`
Caption string `json:"caption"` // ID unique identifier for this result, 1-64 bytes
Description string `json:"description"` //
ParseMode string `json:"parse_mode"` // required
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ID string `json:"id"`
InputMessageContent interface{} `json:"input_message_content,omitempty"` // 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
// Caption of the document to be sent, 0-1024 characters after entities parsing
//
// optional
Caption string `json:"caption"`
// Description short description of the result
//
// optional
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"`
// ReplyMarkup inline keyboard attached to the message
//
// optional
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"`
} }
// InlineQueryResultLocation is an inline query response location. // InlineQueryResultLocation is an inline query response location.