mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
refactor: change all Robot
to Bot
(#1767)
* Change all `Robot` to `Bot` * Change all `r` of `Bot` to `b` * Change `Robot` to `bot` in comments * Fix typo --------- Co-authored-by: Athurg Feng <athurg@gooth.org>
This commit is contained in:
@@ -7,14 +7,14 @@ import (
|
||||
)
|
||||
|
||||
// GetUpdates make a getUpdates api request.
|
||||
func (r *Robot) GetUpdates(ctx context.Context, offset int) ([]Update, error) {
|
||||
func (b *Bot) GetUpdates(ctx context.Context, offset int) ([]Update, error) {
|
||||
formData := url.Values{
|
||||
"timeout": {"60"},
|
||||
"offset": {strconv.Itoa(offset)},
|
||||
}
|
||||
|
||||
var result []Update
|
||||
err := r.postForm(ctx, "/getUpdates", formData, &result)
|
||||
err := b.postForm(ctx, "/getUpdates", formData, &result)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user