closes #17 adding response to SetWebhook Method

bot-api-6.1
Christopher T. Herrera 2015-09-04 12:13:58 -04:00
parent 766f7494e9
commit 4d3619d856
1 changed files with 2 additions and 4 deletions

View File

@ -880,13 +880,11 @@ func (bot *BotAPI) GetUpdates(config UpdateConfig) ([]Update, error) {
// If this is set, GetUpdates will not get any data! // If this is set, GetUpdates will not get any data!
// //
// Requires Url OR to set Clear to true. // 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{} v := url.Values{}
if !config.Clear { if !config.Clear {
v.Add("url", config.URL.String()) v.Add("url", config.URL.String())
} }
_, err := bot.MakeRequest("setWebhook", v) return bot.MakeRequest("setWebhook", v)
return err
} }