aboutsummaryrefslogtreecommitdiff
path: root/api.go
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2019-08-09 02:16:08 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2019-08-09 02:16:08 +0300
commit188740f248bf26934aa8db832f5c9c9b9418b2fc (patch)
tree89f2c9f5ab9ba267862d16b9d0dc048b00f06fea /api.go
parent94c96cef29cd83bc60b2eabb8bb89c9fd8c7059b (diff)
0.1.8 Release -- small fixes
Diffstat (limited to 'api.go')
-rw-r--r--api.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/api.go b/api.go
index 57ee096..81d84ea 100644
--- a/api.go
+++ b/api.go
@@ -1,5 +1,5 @@
-// Package tamtam implements TamTam Bot API
-// Copyright (c) 2019 Alexander Kiryukhin <a.kiryukhin@mail.ru>
+//Package tamtam implements TamTam Bot API
+//Copyright (c) 2019 Alexander Kiryukhin <a.kiryukhin@mail.ru>
package tamtam
import (
@@ -13,6 +13,7 @@ import (
"time"
)
+//Api implements main part of TamTam API
type Api struct {
Bots *bots
Chats *chats
@@ -194,10 +195,12 @@ func (a *Api) UpdatesLoop(ctx context.Context) error {
}
}
+//GetUpdates returns updates channel
func (a *Api) GetUpdates() chan UpdateInterface {
return a.updates
}
+//GetHandler returns http handler for webhooks
func (a *Api) GetHandler(updates chan interface{}) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
defer func() {