(fix): finalize v2 contracts (tests): cover v2 migration (doc): prepare release guidance
This commit is contained in:
@@ -44,7 +44,7 @@ type SendGame struct {
|
||||
// See https://core.telegram.org/bots/api#sendgame
|
||||
func (api *API) SendGame(params SendGame) (Message, error) {
|
||||
req := NewRequestWithChatID[Message]("sendGame", params, params.ChatID)
|
||||
return req.Do(api)
|
||||
return api.Do(req)
|
||||
}
|
||||
|
||||
// SendGameWithContext is the context-aware variant of SendGame.
|
||||
@@ -53,7 +53,7 @@ func (api *API) SendGame(params SendGame) (Message, error) {
|
||||
// See https://core.telegram.org/bots/api#sendgame
|
||||
func (api *API) SendGameWithContext(ctx context.Context, params SendGame) (Message, error) {
|
||||
req := NewRequestWithChatID[Message]("sendGame", params, params.ChatID)
|
||||
return req.DoWithContext(ctx, api)
|
||||
return api.DoWithContext(ctx, req)
|
||||
}
|
||||
|
||||
// SetGameScore holds parameters for the setGameScore method.
|
||||
@@ -88,11 +88,11 @@ func (api *API) SetGameScore(params SetGameScore) (Message, bool, error) {
|
||||
var zero Message
|
||||
if params.InlineMessageID != "" {
|
||||
req := NewRequestWithChatID[bool]("setGameScore", params, params.ChatID)
|
||||
res, err := req.Do(api)
|
||||
res, err := api.Do(req)
|
||||
return zero, res, err
|
||||
}
|
||||
req := NewRequestWithChatID[Message]("setGameScore", params, params.ChatID)
|
||||
res, err := req.Do(api)
|
||||
res, err := api.Do(req)
|
||||
return res, false, err
|
||||
}
|
||||
|
||||
@@ -104,11 +104,11 @@ func (api *API) SetGameScoreWithContext(ctx context.Context, params SetGameScore
|
||||
var zero Message
|
||||
if params.InlineMessageID != "" {
|
||||
req := NewRequestWithChatID[bool]("setGameScore", params, params.ChatID)
|
||||
res, err := req.DoWithContext(ctx, api)
|
||||
res, err := api.DoWithContext(ctx, req)
|
||||
return zero, res, err
|
||||
}
|
||||
req := NewRequestWithChatID[Message]("setGameScore", params, params.ChatID)
|
||||
res, err := req.DoWithContext(ctx, api)
|
||||
res, err := api.DoWithContext(ctx, req)
|
||||
return res, false, err
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ type GetGameHighScores struct {
|
||||
// See https://core.telegram.org/bots/api#getgamehighscores
|
||||
func (api *API) GetGameHighScores(params GetGameHighScores) ([]GameHighScore, error) {
|
||||
req := NewRequestWithChatID[[]GameHighScore]("getGameHighScores", params, params.ChatID)
|
||||
return req.Do(api)
|
||||
return api.Do(req)
|
||||
}
|
||||
|
||||
// GetGameHighScoresWithContext is the context-aware variant of GetGameHighScores.
|
||||
@@ -141,5 +141,5 @@ func (api *API) GetGameHighScores(params GetGameHighScores) ([]GameHighScore, er
|
||||
// See https://core.telegram.org/bots/api#getgamehighscores
|
||||
func (api *API) GetGameHighScoresWithContext(ctx context.Context, params GetGameHighScores) ([]GameHighScore, error) {
|
||||
req := NewRequestWithChatID[[]GameHighScore]("getGameHighScores", params, params.ChatID)
|
||||
return req.DoWithContext(ctx, api)
|
||||
return api.DoWithContext(ctx, req)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user