(fix): finalize v2 contracts (tests): cover v2 migration (doc): prepare release guidance
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user