Updated to the last tgbot API
Jqs7 7@jqs7.com
Wed, 05 Aug 2015 09:44:09 +0800
2 files changed,
10 insertions(+),
2 deletions(-)
M
methods.go
→
methods.go
@@ -99,6 +99,8 @@
// VideoConfig contains information about a SendVideo request. type VideoConfig struct { ChatID int + Duration int + Caption string ReplyToMessageID int ReplyMarkup interface{} UseExistingVideo bool@@ -599,6 +601,12 @@ v.Add("chat_id", strconv.Itoa(config.ChatID))
v.Add("video", config.FileID) if config.ReplyToMessageID != 0 { v.Add("reply_to_message_id", strconv.Itoa(config.ReplyToMessageID)) + } + if config.Duration != 0 { + v.Add("duration", strconv.Itoa(config.Duration)) + } + if config.Caption != "" { + v.Add("caption", config.Caption) } if config.ReplyMarkup != nil { data, err := json.Marshal(config.ReplyMarkup)
M
types.go
→
types.go
@@ -73,6 +73,7 @@ Document Document `json:"document"`
Photo []PhotoSize `json:"photo"` Sticker Sticker `json:"sticker"` Video Video `json:"video"` + Caption string `json:"caption"` Contact Contact `json:"contact"` Location Location `json:"location"` NewChatParticipant User `json:"new_chat_participant"`@@ -136,7 +137,6 @@ Duration int `json:"duration"`
Thumbnail PhotoSize `json:"thumb"` MimeType string `json:"mime_type"` FileSize int `json:"file_size"` - Caption string `json:"caption"` } // Contact contains information about a contact, such as PhoneNumber and UserId.@@ -144,7 +144,7 @@ type Contact struct {
PhoneNumber string `json:"phone_number"` FirstName string `json:"first_name"` LastName string `json:"last_name"` - UserID string `json:"user_id"` + UserID int `json:"user_id"` } // Location contains information about a place, such as Longitude and Latitude.