Add inline query result video types documentation

bot-api-6.1
Ilya Kaznacheev 2020-10-24 21:05:03 +03:00
parent 30975af674
commit 11023a093f
No known key found for this signature in database
GPG Key ID: 7E2C1D8A4AB37D50
1 changed files with 92 additions and 22 deletions

114
types.go
View File

@ -1062,32 +1062,102 @@ type InlineQueryResultCachedMpeg4Gif struct {
// InlineQueryResultVideo is an inline query response video. // InlineQueryResultVideo is an inline query response video.
type InlineQueryResultVideo struct { type InlineQueryResultVideo struct {
Type string `json:"type"` // required // Type of the result, must be video
ID string `json:"id"` // required //
URL string `json:"video_url"` // required // required
MimeType string `json:"mime_type"` // required Type string `json:"type"`
ThumbURL string `json:"thumb_url"` // ID unique identifier for this result, 1-64 bytes
Title string `json:"title"` //
Caption string `json:"caption"` // required
Width int `json:"video_width"` ID string `json:"id"`
Height int `json:"video_height"` // URL a valid url for the embedded video player or video file
Duration int `json:"video_duration"` //
Description string `json:"description"` // required
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` URL string `json:"video_url"`
InputMessageContent interface{} `json:"input_message_content,omitempty"` // MimeType of the content of video url, “text/html” or “video/mp4”
//
// required
MimeType string `json:"mime_type"`
//
// ThumbURL url of the thumbnail (jpeg only) for the video
// optional
ThumbURL string `json:"thumb_url"`
// Title for the result
//
// required
Title string `json:"title"`
// Caption of the video to be sent, 0-1024 characters after entities parsing
//
// optional
Caption string `json:"caption"`
// Width video width
//
// optional
Width int `json:"video_width"`
// Height video height
//
// optional
Height int `json:"video_height"`
// Duration video duration in seconds
//
// optional
Duration int `json:"video_duration"`
// Description short description of the result
//
// optional
Description string `json:"description"`
// 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 video.
// This field is required if InlineQueryResultVideo is used to send
// an HTML-page as a result (e.g., a YouTube video).
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"`
} }
// InlineQueryResultCachedVideo is an inline query response with cached video. // InlineQueryResultCachedVideo is an inline query response with cached video.
type InlineQueryResultCachedVideo struct { type InlineQueryResultCachedVideo struct {
Type string `json:"type"` // required // Type of the result, must be video
ID string `json:"id"` // required //
VideoID string `json:"video_file_id"` // required // required
Title string `json:"title"` // required Type string `json:"type"`
Description string `json:"description"` // ID unique identifier for this result, 1-64 bytes
Caption string `json:"caption"` //
ParseMode string `json:"parse_mode"` // required
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ID string `json:"id"`
InputMessageContent interface{} `json:"input_message_content,omitempty"` // VideoID a valid file identifier for the video file
//
// required
VideoID string `json:"video_file_id"`
// Title for the result
//
// required
Title string `json:"title"`
// Description short description of the result
//
// optional
Description string `json:"description"`
// Caption of the video to be sent, 0-1024 characters after entities parsing
//
// optional
Caption string `json:"caption"`
// 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 video
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"`
} }
// InlineQueryResultCachedSticker is an inline query response with cached sticker. // InlineQueryResultCachedSticker is an inline query response with cached sticker.