all repos — telegram-bot-api @ 7092cefe655def68e5a4b009f03270f7b9f2bbe5

Golang bindings for the Telegram Bot API

add missing const
Syfaro syfaro@foxpaw.in
Sat, 19 Sep 2015 13:42:50 -0500
commit

7092cefe655def68e5a4b009f03270f7b9f2bbe5

parent

1bbe8c7bd299305b818da90bd2fd6ce0be5f5c07

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

jump to
M methods.gomethods.go

@@ -19,6 +19,8 @@ // Telegram constants

const ( // APIEndpoint is the endpoint for all API methods, with formatting for Sprintf APIEndpoint = "https://api.telegram.org/bot%s/%s" + // FileEndpoint is the endpoint for downloading a file from Telegram + FileEndpoint = "https://api.telegram.org/file/bot%s/%s" ) // Constant values for ChatActions
M types.gotypes.go

@@ -183,7 +183,7 @@ // Link returns a full path to the download URL for a File.

// // It requires the Bot Token to create the link. func (f *File) Link(token string) string { - return fmt.Sprintf("https://api.telegram.org/file/bot%s/%s", token, f.FilePath) + return fmt.Sprintf(FileEndpoint, token, f.FilePath) } // ReplyKeyboardMarkup allows the Bot to set a custom keyboard.