Add inline query result cached photo and gif types documentation
parent
12b37b42cc
commit
1e4e3c891c
76
types.go
76
types.go
|
@ -849,29 +849,91 @@ type InlineQueryResultPhoto struct {
|
||||||
|
|
||||||
// InlineQueryResultCachedPhoto is an inline query response with cached photo.
|
// InlineQueryResultCachedPhoto is an inline query response with cached photo.
|
||||||
type InlineQueryResultCachedPhoto struct {
|
type InlineQueryResultCachedPhoto struct {
|
||||||
Type string `json:"type"` // required
|
// Type of the result, must be photo.
|
||||||
ID string `json:"id"` // required
|
//
|
||||||
PhotoID string `json:"photo_file_id"` // required
|
// required
|
||||||
|
Type string `json:"type"`
|
||||||
|
// ID unique identifier for this result, 1-64 bytes.
|
||||||
|
//
|
||||||
|
// required
|
||||||
|
ID string `json:"id"`
|
||||||
|
// PhotoID a valid file identifier of the photo.
|
||||||
|
//
|
||||||
|
// required
|
||||||
|
PhotoID string `json:"photo_file_id"`
|
||||||
|
// Title for the result.
|
||||||
|
//
|
||||||
|
// optional
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
|
// Description short description of the result.
|
||||||
|
//
|
||||||
|
// optional
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
|
// Caption of the photo to be sent, 0-1024 characters after entities parsing.
|
||||||
|
//
|
||||||
|
// optional
|
||||||
Caption string `json:"caption"`
|
Caption string `json:"caption"`
|
||||||
|
// ParseMode mode for parsing entities in the photo 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 photo.
|
||||||
|
//
|
||||||
|
// optional
|
||||||
InputMessageContent interface{} `json:"input_message_content,omitempty"`
|
InputMessageContent interface{} `json:"input_message_content,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// InlineQueryResultGIF is an inline query response GIF.
|
// InlineQueryResultGIF is an inline query response GIF.
|
||||||
type InlineQueryResultGIF struct {
|
type InlineQueryResultGIF struct {
|
||||||
Type string `json:"type"` // required
|
// Type of the result, must be gif.
|
||||||
ID string `json:"id"` // required
|
//
|
||||||
URL string `json:"gif_url"` // required
|
// required
|
||||||
ThumbURL string `json:"thumb_url"` // required
|
Type string `json:"type"`
|
||||||
|
// ID unique identifier for this result, 1-64 bytes.
|
||||||
|
//
|
||||||
|
// required
|
||||||
|
ID string `json:"id"`
|
||||||
|
// URL a valid URL for the GIF file. File size must not exceed 1MB.
|
||||||
|
//
|
||||||
|
// required
|
||||||
|
URL string `json:"gif_url"`
|
||||||
|
// ThumbURL url of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result.
|
||||||
|
//
|
||||||
|
// required
|
||||||
|
ThumbURL string `json:"thumb_url"`
|
||||||
|
// Width of the GIF
|
||||||
|
//
|
||||||
|
// optional
|
||||||
Width int `json:"gif_width,omitempty"`
|
Width int `json:"gif_width,omitempty"`
|
||||||
|
// Height of the GIF
|
||||||
|
//
|
||||||
|
// optional
|
||||||
Height int `json:"gif_height,omitempty"`
|
Height int `json:"gif_height,omitempty"`
|
||||||
|
// Duration of the GIF
|
||||||
|
//
|
||||||
|
// optional
|
||||||
Duration int `json:"gif_duration,omitempty"`
|
Duration int `json:"gif_duration,omitempty"`
|
||||||
|
// Title for the result
|
||||||
|
//
|
||||||
|
// optional
|
||||||
Title string `json:"title,omitempty"`
|
Title string `json:"title,omitempty"`
|
||||||
|
// Caption of the GIF file to be sent, 0-1024 characters after entities parsing.
|
||||||
|
//
|
||||||
|
// optional
|
||||||
Caption string `json:"caption,omitempty"`
|
Caption string `json:"caption,omitempty"`
|
||||||
|
// 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 GIF animation.
|
||||||
|
//
|
||||||
|
// optional
|
||||||
InputMessageContent interface{} `json:"input_message_content,omitempty"`
|
InputMessageContent interface{} `json:"input_message_content,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue