Skip to content

Commit bfc0e31

Browse files
author
George Gabolaev
committed
gobotapi -> bot-golang
1 parent d46306f commit bfc0e31

18 files changed

+104
-105
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
## Install
1313
```bash
14-
go get github.com/mail-ru-im/gobotapi
14+
go get github.com/mail-ru-im/botgolang
1515
```
1616

1717
## Usage
@@ -25,10 +25,10 @@ Note a bot can only reply after the user has added it to his contacts list, or i
2525
```go
2626
package main
2727

28-
import "github.com/mail-ru-im/gobotapi"
28+
import "github.com/mail-ru-im/botgolang"
2929

3030
func main() {
31-
bot, err := gobotapi.NewBot(BOT_TOKEN)
31+
bot, err := botgolang.NewBot(BOT_TOKEN)
3232
if err != nil {
3333
log.Println("wrong token")
3434
}
@@ -75,12 +75,12 @@ You don't need this.
7575
But if you do, you can override bot's API URL:
7676

7777
```go
78-
bot := gobotapi.NewBot(BOT_TOKEN, gobotapi.BotApiURL("https://agent.mail.ru/bot/v1"))
78+
bot := botgolang.NewBot(BOT_TOKEN, botgolang.BotApiURL("https://agent.mail.ru/bot/v1"))
7979
```
8080
And debug all api requests and responses:
8181

8282
```go
83-
bot := gobotapi.NewBot(BOT_TOKEN, gobotapi.BotDebug(true))
83+
bot := botgolang.NewBot(BOT_TOKEN, botgolang.BotDebug(true))
8484
```
8585

8686

api_mock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gobotapi
1+
package botgolang
22

33
import (
44
"encoding/json"

bot.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package gobotapi
1+
package botgolang
22

33
/*
4-
💥 GoBotAPI is zero-configuration library with convenient interface.
4+
💥 botgolang is zero-configuration library with convenient interface.
55
Crafted with love in @mail for your awesome bots.
66
*/
77

chat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gobotapi
1+
package botgolang
22

33
//go:generate easyjson -all chat.go
44

chat_easyjson.go

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gobotapi
1+
package botgolang
22

33
import (
44
"bytes"

client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gobotapi
1+
package botgolang
22

33
import (
44
"net/http"

example/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
"os"
88
"time"
99

10-
"github.com/mail-ru-im/gobotapi"
10+
"github.com/mail-ru-im/bot-golang"
1111
)
1212

1313
func main() {
1414
token := os.Getenv("TOKEN")
1515

16-
bot, err := gobotapi.NewBot(token, gobotapi.BotDebug(true))
16+
bot, err := botgolang.NewBot(token, botgolang.BotDebug(true))
1717
if err != nil {
1818
log.Fatalf("cannot connect to bot: %s", err)
1919
}
@@ -53,12 +53,12 @@ func main() {
5353
for update := range updates {
5454
fmt.Println(update.Type, update.Payload)
5555
switch update.Type {
56-
case gobotapi.NEW_MESSAGE:
56+
case botgolang.NEW_MESSAGE:
5757
message := update.Payload.Message()
5858
if err := message.Send(); err != nil {
5959
log.Printf("something went wrong: %s", err)
6060
}
61-
case gobotapi.EDITED_MESSAGE:
61+
case botgolang.EDITED_MESSAGE:
6262
message := update.Payload.Message()
6363
message.Reply("do not edit!")
6464
}

file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gobotapi
1+
package botgolang
22

33
//go:generate easyjson -all file.go
44

file_easyjson.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)