all repos — telegram-bot-api @ 6873dde3ab6252f1d31238d9e214d8dc77f8674b

Golang bindings for the Telegram Bot API

Bot getFileDirectUrl method added
Gleb Sinyavsky zhulik.gleb@gmail.com
Sat, 21 Nov 2015 16:25:59 +0300
commit

6873dde3ab6252f1d31238d9e214d8dc77f8674b

parent

f8a3ac11b269886c17a6f11ca37b6daf54e2affc

1 files changed, 10 insertions(+), 0 deletions(-)

jump to
M bot.gobot.go

@@ -169,6 +169,16 @@

return apiResp, nil } +func (this *BotAPI) getFileDirectUrl(fileID string) (string, error) { + file, err := this.GetFile(FileConfig{fileID}) + + if err != nil { + return "", err + } + + return file.Link(this.Token), nil +} + // GetMe fetches the currently authenticated bot. // // There are no parameters for this method.