func (b *Bot) requestResponseWebhookInfo() (result APIResponseWebhookInfo) {
	var errStr string

	if bytes, err := b.request("getWebhookInfo", map[string]interface{}{}); err == nil {
		var jsonResponse APIResponseWebhookInfo
		err = json.Unmarshal(bytes, &jsonResponse)
		if err == nil {
			return jsonResponse
		}

		errStr = fmt.Sprintf("json parse error: %s (%s)", err, string(bytes))
	} else {
		errStr = fmt.Sprintf("getWebhookInfo failed with error: %s", err)
	}

	b.error(errStr)

	return APIResponseWebhookInfo{APIResponseBase: APIResponseBase{Ok: false, Description: &errStr}}
}
// Send request for APIResponseWebhookInfo and fetch its result.
Send request for APIResponseWebhookInfo and fetch its result.
// Send request for APIResponseWebhookInfo and fetch its result .
func (b *Bot) requestResponseWebhookInfo() (result APIResponseWebhookInfo) {
	var errStr string
	if bytes, err := b.request("getWebhookInfo", map[string]interface{}{}); err == nil {
		var jsonResponse APIResponseWebhookInfo
		err = json.Unmarshal(bytes, &jsonResponse)
		if err == nil {
			return jsonResponse
		}
		errStr = fmt.Sprintf("json parse error: %s (%s)", err, string(bytes))
	} else {
		errStr = fmt.Sprintf("getWebhookInfo failed with error: %s", err)
	}
	b.error(errStr)
	return APIResponseWebhookInfo{APIResponseBase: APIResponseBase{Ok: false, Description: &errStr}}
}
func ( b * Bot ) requestResponseWebhookInfo ( ) ( result APIResponseWebhookInfo ) { var errStr string if bytes , err := b . request ( " " , map [ string ] interface { } { } ) ; err == nil { var jsonResponse APIResponseWebhookInfo err = json . Unmarshal ( bytes , & jsonResponse ) if err == nil { return jsonResponse } errStr = fmt . Sprintf ( " " , err , string ( bytes ) ) } else { errStr = fmt . Sprintf ( " " , err ) } b . error ( errStr ) return APIResponseWebhookInfo { APIResponseBase : APIResponseBase { Ok : false , Description : & errStr } } }
Send request for APIResponseWebhookInfo and fetch its result.
Send request for APIResponseWebhookInfo and fetch its result .