Add inline query result location, venue and game types documentation

bot-api-6.1
Ilya Kaznacheev 2020-10-24 23:13:56 +03:00
parent ea8eadd3c8
commit 874f3f2c47
No known key found for this signature in database
GPG Key ID: 7E2C1D8A4AB37D50
1 changed files with 109 additions and 27 deletions

136
types.go
View File

@ -1436,41 +1436,123 @@ type InlineQueryResultCachedDocument struct {
// InlineQueryResultLocation is an inline query response location. // InlineQueryResultLocation is an inline query response location.
type InlineQueryResultLocation struct { type InlineQueryResultLocation struct {
Type string `json:"type"` // required // Type of the result, must be location
ID string `json:"id"` // required //
Latitude float64 `json:"latitude"` // required // required
Longitude float64 `json:"longitude"` // required Type string `json:"type"`
Title string `json:"title"` // required // ID unique identifier for this result, 1-64 Bytes
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` //
InputMessageContent interface{} `json:"input_message_content,omitempty"` // required
ThumbURL string `json:"thumb_url"` ID string `json:"id"`
ThumbWidth int `json:"thumb_width"` // Latitude of the location in degrees
ThumbHeight int `json:"thumb_height"` //
// required
Latitude float64 `json:"latitude"`
// Longitude of the location in degrees
//
// required
Longitude float64 `json:"longitude"`
// Title of the location
//
// required
Title string `json:"title"`
// 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 location
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"`
// ThumbURL url of the thumbnail for the result
//
// optional
ThumbURL string `json:"thumb_url"`
// ThumbWidth thumbnail width
//
// optional
ThumbWidth int `json:"thumb_width"`
// ThumbHeight thumbnail height
//
// optional
ThumbHeight int `json:"thumb_height"`
} }
// InlineQueryResultVenue is an inline query response venue. // InlineQueryResultVenue is an inline query response venue.
type InlineQueryResultVenue struct { type InlineQueryResultVenue struct {
Type string `json:"type"` // required // Type of the result, must be venue
ID string `json:"id"` // required //
Latitude float64 `json:"latitude"` // required // required
Longitude float64 `json:"longitude"` // required Type string `json:"type"`
Title string `json:"title"` // required // ID unique identifier for this result, 1-64 Bytes
Address string `json:"address"` // required //
FoursquareID string `json:"foursquare_id"` // required
FoursquareType string `json:"foursquare_type"` ID string `json:"id"`
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` // Latitude of the venue location in degrees
InputMessageContent interface{} `json:"input_message_content,omitempty"` //
ThumbURL string `json:"thumb_url"` // required
ThumbWidth int `json:"thumb_width"` Latitude float64 `json:"latitude"`
ThumbHeight int `json:"thumb_height"` // Longitude of the venue location in degrees
//
// required
Longitude float64 `json:"longitude"`
// Title of the venue
//
// required
Title string `json:"title"`
// Address of the venue
//
// required
Address string `json:"address"`
// FoursquareID foursquare identifier of the venue if known
//
// optional
FoursquareID string `json:"foursquare_id"`
// FoursquareType foursquare type of the venue, if known.
// (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
//
// optional
FoursquareType string `json:"foursquare_type"`
// 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 venue
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"`
// ThumbURL url of the thumbnail for the result
//
// optional
ThumbURL string `json:"thumb_url"`
// ThumbWidth thumbnail width
//
// optional
ThumbWidth int `json:"thumb_width"`
// ThumbHeight thumbnail height
//
// optional
ThumbHeight int `json:"thumb_height"`
} }
// InlineQueryResultGame is an inline query response game. // InlineQueryResultGame is an inline query response game.
type InlineQueryResultGame struct { type InlineQueryResultGame struct {
Type string `json:"type"` // Type of the result, must be game
ID string `json:"id"` //
GameShortName string `json:"game_short_name"` // required
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Type string `json:"type"`
// ID unique identifier for this result, 1-64 bytes
//
// required
ID string `json:"id"`
// GameShortName short name of the game
//
// required
GameShortName string `json:"game_short_name"`
// ReplyMarkup inline keyboard attached to the message
//
// optional
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
} }
// ChosenInlineResult is an inline query result chosen by a User // ChosenInlineResult is an inline query result chosen by a User