diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-08-09 17:52:33 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-08-09 17:52:48 +0300 |
commit | b87e42f3294318244deae8126b3ac18d543fd3d7 (patch) | |
tree | 2b4fe1f84b07ddf80a6cb863c385293c5d2c4496 /api.go | |
parent | a8ca31679d01ddfe461cadb994131986639b4ea1 (diff) |
fix uploadsv0.2.0
Diffstat (limited to 'api.go')
-rw-r--r-- | api.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -28,8 +28,9 @@ type Api struct { // New TamTam Api object func New(key string) *Api { + timeout := 30 u, _ := url.Parse("https://botapi.tamtam.chat/") - cl := newClient(key, "0.1.8", u) + cl := newClient(key, "0.1.8", u, &http.Client{Timeout: time.Duration(timeout) * time.Second}) return &Api{ Bots: newBots(cl), Chats: newChats(cl), @@ -38,7 +39,7 @@ func New(key string) *Api { Subscriptions: newSubscriptions(cl), client: cl, updates: make(chan UpdateInterface), - timeout: 30, + timeout: timeout, pause: 1, } } |