(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
+8 -8
View File
@@ -18,7 +18,7 @@ type GetStarTransactions struct {
// See https://core.telegram.org/bots/api#getmystarbalance
func (api *API) GetMyStarBalance() (StarAmount, error) {
req := NewRequest[StarAmount]("getMyStarBalance", NoParams)
return req.Do(api)
return api.Do(req)
}
// GetMyStarBalanceWithContext is the context-aware variant of GetMyStarBalance.
@@ -27,7 +27,7 @@ func (api *API) GetMyStarBalance() (StarAmount, error) {
// See https://core.telegram.org/bots/api#getmystarbalance
func (api *API) GetMyStarBalanceWithContext(ctx context.Context) (StarAmount, error) {
req := NewRequest[StarAmount]("getMyStarBalance", NoParams)
return req.DoWithContext(ctx, api)
return api.DoWithContext(ctx, req)
}
// GetStarTransactions returns Telegram Star transactions for the bot.
@@ -35,7 +35,7 @@ func (api *API) GetMyStarBalanceWithContext(ctx context.Context) (StarAmount, er
// See https://core.telegram.org/bots/api#getstartransactions
func (api *API) GetStarTransactions(params GetStarTransactions) (StarTransactions, error) {
req := NewRequest[StarTransactions]("getStarTransactions", params)
return req.Do(api)
return api.Do(req)
}
// GetStarTransactionsWithContext is the context-aware variant of GetStarTransactions.
@@ -44,7 +44,7 @@ func (api *API) GetStarTransactions(params GetStarTransactions) (StarTransaction
// See https://core.telegram.org/bots/api#getstartransactions
func (api *API) GetStarTransactionsWithContext(ctx context.Context, params GetStarTransactions) (StarTransactions, error) {
req := NewRequest[StarTransactions]("getStarTransactions", params)
return req.DoWithContext(ctx, api)
return api.DoWithContext(ctx, req)
}
// RefundStarPayment holds parameters for the refundStarPayment method.
@@ -63,7 +63,7 @@ type RefundStarPayment struct {
// See https://core.telegram.org/bots/api#refundstarpayment
func (api *API) RefundStarPayment(params RefundStarPayment) (bool, error) {
req := NewRequest[bool]("refundStarPayment", params)
return req.Do(api)
return api.Do(req)
}
// RefundStarPaymentWithContext is the context-aware variant of RefundStarPayment.
@@ -72,7 +72,7 @@ func (api *API) RefundStarPayment(params RefundStarPayment) (bool, error) {
// See https://core.telegram.org/bots/api#refundstarpayment
func (api *API) RefundStarPaymentWithContext(ctx context.Context, params RefundStarPayment) (bool, error) {
req := NewRequest[bool]("refundStarPayment", params)
return req.DoWithContext(ctx, api)
return api.DoWithContext(ctx, req)
}
// EditUserStarSubscription holds parameters for the editUserStarSubscription method.
@@ -95,7 +95,7 @@ type EditUserStarSubscription struct {
// See https://core.telegram.org/bots/api#edituserstarsubscription
func (api *API) EditUserStarSubscription(params EditUserStarSubscription) (bool, error) {
req := NewRequest[bool]("editUserStarSubscription", params)
return req.Do(api)
return api.Do(req)
}
// EditUserStarSubscriptionWithContext is the context-aware variant of EditUserStarSubscription.
@@ -104,5 +104,5 @@ func (api *API) EditUserStarSubscription(params EditUserStarSubscription) (bool,
// See https://core.telegram.org/bots/api#edituserstarsubscription
func (api *API) EditUserStarSubscriptionWithContext(ctx context.Context, params EditUserStarSubscription) (bool, error) {
req := NewRequest[bool]("editUserStarSubscription", params)
return req.DoWithContext(ctx, api)
return api.DoWithContext(ctx, req)
}