Add inline query result gif and mpeg4gif types documentation

bot-api-6.1
Ilya Kaznacheev 2020-10-24 18:02:39 +03:00
parent 1e4e3c891c
commit 30975af674
No known key found for this signature in database
GPG Key ID: 7E2C1D8A4AB37D50
1 changed files with 110 additions and 27 deletions

137
types.go
View File

@ -939,42 +939,125 @@ type InlineQueryResultGIF struct {
// InlineQueryResultCachedGIF is an inline query response with cached gif. // InlineQueryResultCachedGIF is an inline query response with cached gif.
type InlineQueryResultCachedGIF struct { type InlineQueryResultCachedGIF struct {
Type string `json:"type"` // required // Type of the result, must be gif.
ID string `json:"id"` // required //
GifID string `json:"gif_file_id"` // required // required
Title string `json:"title"` Type string `json:"type"`
Caption string `json:"caption"` // ID unique identifier for this result, 1-64 bytes.
ParseMode string `json:"parse_mode"` //
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` // required
InputMessageContent interface{} `json:"input_message_content,omitempty"` ID string `json:"id"`
// GifID a valid file identifier for the GIF file.
//
// required
GifID string `json:"gif_file_id"`
// Title for the result
//
// optional
Title string `json:"title"`
// Caption of the GIF file to be sent, 0-1024 characters after entities parsing.
//
// optional
Caption string `json:"caption"`
// ParseMode mode for parsing entities in the 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 GIF animation.
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"`
} }
// InlineQueryResultMPEG4GIF is an inline query response MPEG4 GIF. // InlineQueryResultMPEG4GIF is an inline query response MPEG4 GIF.
type InlineQueryResultMPEG4GIF struct { type InlineQueryResultMPEG4GIF struct {
Type string `json:"type"` // required // Type of the result, must be mpeg4_gif
ID string `json:"id"` // required //
URL string `json:"mpeg4_url"` // required // required
Width int `json:"mpeg4_width"` Type string `json:"type"`
Height int `json:"mpeg4_height"` // ID unique identifier for this result, 1-64 bytes
Duration int `json:"mpeg4_duration"` //
ThumbURL string `json:"thumb_url"` // required
Title string `json:"title"` ID string `json:"id"`
Caption string `json:"caption"` // URL a valid URL for the MP4 file. File size must not exceed 1MB
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` //
InputMessageContent interface{} `json:"input_message_content,omitempty"` // required
URL string `json:"mpeg4_url"`
// Width video width
//
// optional
Width int `json:"mpeg4_width"`
// Height vVideo height
//
// optional
Height int `json:"mpeg4_height"`
// Duration video duration
//
// optional
Duration int `json:"mpeg4_duration"`
// ThumbURL url of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result.
ThumbURL string `json:"thumb_url"`
// Title for the result
//
// optional
Title string `json:"title"`
// Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing.
//
// optional
Caption string `json:"caption"`
// 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 animation
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"`
} }
// InlineQueryResultCachedMpeg4Gif is an inline query response with cached // InlineQueryResultCachedMpeg4Gif is an inline query response with cached
// H.264/MPEG-4 AVC video without sound gif. // H.264/MPEG-4 AVC video without sound gif.
type InlineQueryResultCachedMpeg4Gif struct { type InlineQueryResultCachedMpeg4Gif struct {
Type string `json:"type"` // required // Type of the result, must be mpeg4_gif
ID string `json:"id"` // required //
MGifID string `json:"mpeg4_file_id"` // required // required
Title string `json:"title"` Type string `json:"type"`
Caption string `json:"caption"` // ID unique identifier for this result, 1-64 bytes
ParseMode string `json:"parse_mode"` //
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` // required
InputMessageContent interface{} `json:"input_message_content,omitempty"` ID string `json:"id"`
// MGifID a valid file identifier for the MP4 file
//
// required
MGifID string `json:"mpeg4_file_id"`
// Title for the result
//
// optional
Title string `json:"title"`
// Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing.
//
// optional
Caption string `json:"caption"`
// ParseMode mode for parsing entities in the 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 animation.
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"`
} }
// InlineQueryResultVideo is an inline query response video. // InlineQueryResultVideo is an inline query response video.