all repos — telegram-bot-api @ 792234b42e6d1ec514f5d63d9cd03438cb04cacc

Golang bindings for the Telegram Bot API

Merge pull request #21 from eefret/master

closes #17 adding response to SetWebhook Method
Syfaro syfaro@foxpaw.in
Fri, 04 Sep 2015 11:21:22 -0500
commit

792234b42e6d1ec514f5d63d9cd03438cb04cacc

parent

766f7494e916bb353bf956bf98d3f88631cf4724

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

jump to
M methods.gomethods.go

@@ -880,13 +880,11 @@ // SetWebhook sets a webhook.

// If this is set, GetUpdates will not get any data! // // Requires Url OR to set Clear to true. -func (bot *BotAPI) SetWebhook(config WebhookConfig) error { +func (bot *BotAPI) SetWebhook(config WebhookConfig) (APIResponse, error){ v := url.Values{} if !config.Clear { v.Add("url", config.URL.String()) } - _, err := bot.MakeRequest("setWebhook", v) - - return err + return bot.MakeRequest("setWebhook", v) }