diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-11-20 15:14:54 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-11-20 15:14:54 +0300 |
commit | 7a749a3d0c87ddb9d8109c5cbca7d7efcb3991eb (patch) | |
tree | 4c00b77dcb08920733035fcb1fdf16497b60ff83 /api.go | |
parent | b551e8bcc63900eee1052499b00e9eb2fce71d77 (diff) |
Fix descriptionv0.3.3
Fix int64 ids
Diffstat (limited to 'api.go')
-rw-r--r-- | api.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -142,7 +142,7 @@ func (a *Api) bytesToProperAttachment(b []byte) schemes.AttachmentInterface { return attachment } -func (a *Api) getUpdates(limit int, timeout int, marker int, types []string) (*schemes.UpdateList, error) { +func (a *Api) getUpdates(limit int, timeout int, marker int64, types []string) (*schemes.UpdateList, error) { result := new(schemes.UpdateList) values := url.Values{} if limit > 0 { @@ -152,7 +152,7 @@ func (a *Api) getUpdates(limit int, timeout int, marker int, types []string) (*s values.Set("timeout", strconv.Itoa(timeout)) } if marker > 0 { - values.Set("marker", strconv.Itoa(marker)) + values.Set("marker", strconv.Itoa(int(marker))) } if len(types) > 0 { for _, t := range types { @@ -182,7 +182,7 @@ func (a *Api) GetUpdates(ctx context.Context) chan schemes.UpdateInterface { close(ch) return case <-time.After(time.Duration(a.pause) * time.Second): - var marker int + var marker int64 for { upds, err := a.getUpdates(50, a.timeout, marker, []string{}) if err != nil { |