(new): support Bot API 10.3
Golang lint / lint (push) Failing after 1m37s

(fix): finalize v2 contracts
(tests): cover v2 migration
(doc): prepare release guidance
This commit is contained in:
2026-09-08 23:21:38 +03:00
parent 24040fe164
commit d78526242b
88 changed files with 2321 additions and 918 deletions
+32
View File
@@ -0,0 +1,32 @@
package tgapi
import (
"context"
"testing"
)
func TestV2MigrationSurfaceCompiles(t *testing.T) {
answer := PollAnswer{User: &User{ID: 1}}
if answer.User == nil {
t.Fatal("poll voter is missing")
}
_ = ChatFullInfo{AvailableReactions: []ReactionType{}}
_ = ReplyParameters{QuoteParseMode: string(ParseHTML)}
_ = InputChecklist{OthersCanAddTasks: true, OthersCanMarkTasksAsDone: true}
_ = SendMessage{EphemeralMessageParameters: &EphemeralMessageParameters{ReceiverUserID: 1}}
request := NewRequest[bool]("customMethod", NoParams)
upload := NewUploaderRequest[bool]("customUpload", NoParams)
var api *API
var uploader *Uploader
if false {
_, _ = api.Do(request)
_, _ = api.DoWithContext(context.Background(), request)
_, _ = uploader.Do(upload)
_, _ = uploader.DoWithContext(context.Background(), upload)
_, _ = api.DeleteAllMessageReactions(DeleteAllMessageReactions{})
_, _ = api.GetFileByLinkLimit("file/path", 1<<20)
_, _ = api.OpenFileByLinkWithContext(context.Background(), "file/path")
}
}