aboutsummaryrefslogtreecommitdiff
path: root/bots.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 /bots.go
parent94c96cef29cd83bc60b2eabb8bb89c9fd8c7059b (diff)
0.1.8 Release -- small fixes
Diffstat (limited to 'bots.go')
-rw-r--r--bots.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/bots.go b/bots.go
index 78b3d88..deb64b5 100644
--- a/bots.go
+++ b/bots.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 (
@@ -17,6 +17,7 @@ func newBots(client *client) *bots {
return &bots{client: client}
}
+//GetBot returns info about current bot. Current bot can be identified by access token. Method returns bot identifier, name and avatar (if any)
func (a *bots) GetBot() (*BotInfo, error) {
result := new(BotInfo)
values := url.Values{}
@@ -32,6 +33,7 @@ func (a *bots) GetBot() (*BotInfo, error) {
return result, json.NewDecoder(body).Decode(result)
}
+//PatchBot edits current bot info. Fill only the fields you want to update. All remaining fields will stay untouched
func (a *bots) PatchBot(patch *BotPatch) (*BotInfo, error) {
result := new(BotInfo)
values := url.Values{}