all repos — telegram-bot-api @ aa124ef1e84ecc14654ad242f3cf3bd2b0d5956c

Golang bindings for the Telegram Bot API

Merge pull request #294 from mkishere/inline-venue

Add inline venue type
Syfaro syfaro@huefox.com
Mon, 13 Jan 2020 00:30:19 -0600
commit

aa124ef1e84ecc14654ad242f3cf3bd2b0d5956c

parent

194446470b3786f7e02286afd073eab15c96eed8

2 files changed, 30 insertions(+), 1 deletions(-)

jump to
M helpers.gohelpers.go

@@ -604,6 +604,18 @@ Longitude: longitude,

} } +// NewInlineQueryResultVenue creates a new inline query venue. +func NewInlineQueryResultVenue(id, title, address string, latitude, longitude float64) InlineQueryResultVenue { + return InlineQueryResultVenue{ + Type: "venue", + ID: id, + Title: title, + Address: address, + Latitude: latitude, + Longitude: longitude, + } +} + // NewEditMessageText allows you to edit the text of a message. func NewEditMessageText(chatID int64, messageID int, text string) EditMessageTextConfig { return EditMessageTextConfig{

@@ -622,7 +634,7 @@ BaseEdit: BaseEdit{

ChatID: chatID, MessageID: messageID, }, - Caption: caption, + Caption: caption, } }
M types.gotypes.go

@@ -828,6 +828,23 @@ ThumbWidth int `json:"thumb_width"`

ThumbHeight int `json:"thumb_height"` } +// InlineQueryResultVenue is an inline query response venue. +type InlineQueryResultVenue struct { + Type string `json:"type"` // required + ID string `json:"id"` // required + Latitude float64 `json:"latitude"` // required + Longitude float64 `json:"longitude"` // required + Title string `json:"title"` // required + Address string `json:"address"` // required + FoursquareID string `json:"foursquare_id"` + FoursquareType string `json:"foursquare_type"` + ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` + InputMessageContent interface{} `json:"input_message_content,omitempty"` + ThumbURL string `json:"thumb_url"` + ThumbWidth int `json:"thumb_width"` + ThumbHeight int `json:"thumb_height"` +} + // InlineQueryResultGame is an inline query response game. type InlineQueryResultGame struct { Type string `json:"type"`