Add input message content types documentation

bot-api-6.1
Ilya Kaznacheev 2020-10-24 23:21:34 +03:00
parent 536eb5215a
commit 25c494b335
No known key found for this signature in database
GPG Key ID: 7E2C1D8A4AB37D50
1 changed files with 34 additions and 11 deletions

View File

@ -1578,34 +1578,57 @@ type ChosenInlineResult struct {
// InputTextMessageContent contains text for displaying // InputTextMessageContent contains text for displaying
// as an inline query result. // as an inline query result.
type InputTextMessageContent struct { type InputTextMessageContent struct {
Text string `json:"message_text"` // Text of the message to be sent, 1-4096 characters
ParseMode string `json:"parse_mode"` Text string `json:"message_text"`
DisableWebPagePreview bool `json:"disable_web_page_preview"` // ParseMode mode for parsing entities in the message text.
// See formatting options for more details
// (https://core.telegram.org/bots/api#formatting-options).
//
// optional
ParseMode string `json:"parse_mode"`
// DisableWebPagePreview disables link previews for links in the sent message
//
// optional
DisableWebPagePreview bool `json:"disable_web_page_preview"`
} }
// InputLocationMessageContent contains a location for displaying // InputLocationMessageContent contains a location for displaying
// as an inline query result. // as an inline query result.
type InputLocationMessageContent struct { type InputLocationMessageContent struct {
Latitude float64 `json:"latitude"` // Latitude of the location in degrees
Latitude float64 `json:"latitude"`
// Longitude of the location in degrees
Longitude float64 `json:"longitude"` Longitude float64 `json:"longitude"`
} }
// InputVenueMessageContent contains a venue for displaying // InputVenueMessageContent contains a venue for displaying
// as an inline query result. // as an inline query result.
type InputVenueMessageContent struct { type InputVenueMessageContent struct {
Latitude float64 `json:"latitude"` // Latitude of the venue in degrees
Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"`
Title string `json:"title"` // Longitude of the venue in degrees
Address string `json:"address"` Longitude float64 `json:"longitude"`
FoursquareID string `json:"foursquare_id"` // Title name of the venue
Title string `json:"title"`
// Address of the venue
Address string `json:"address"`
// FoursquareID foursquare identifier of the venue, if known
//
// optional
FoursquareID string `json:"foursquare_id"`
} }
// InputContactMessageContent contains a contact for displaying // InputContactMessageContent contains a contact for displaying
// as an inline query result. // as an inline query result.
type InputContactMessageContent struct { type InputContactMessageContent struct {
// PhoneNumber contact's phone number
PhoneNumber string `json:"phone_number"` PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"` // FirstName contact's first name
LastName string `json:"last_name"` FirstName string `json:"first_name"`
// LastName contact's last name
//
// optional
LastName string `json:"last_name"`
} }
// Invoice contains basic information about an invoice. // Invoice contains basic information about an invoice.