(fix): finalize v2 contracts (tests): cover v2 migration (doc): prepare release guidance
This commit is contained in:
@@ -111,7 +111,7 @@ type SendInvoice struct {
|
||||
// See https://core.telegram.org/bots/api#sendinvoice
|
||||
func (api *API) SendInvoice(params SendInvoice) (Message, error) {
|
||||
req := NewRequestWithChatID[Message]("sendInvoice", params, params.ChatID)
|
||||
return req.Do(api)
|
||||
return api.Do(req)
|
||||
}
|
||||
|
||||
// SendInvoiceWithContext is the context-aware variant of SendInvoice.
|
||||
@@ -120,7 +120,7 @@ func (api *API) SendInvoice(params SendInvoice) (Message, error) {
|
||||
// See https://core.telegram.org/bots/api#sendinvoice
|
||||
func (api *API) SendInvoiceWithContext(ctx context.Context, params SendInvoice) (Message, error) {
|
||||
req := NewRequestWithChatID[Message]("sendInvoice", params, params.ChatID)
|
||||
return req.DoWithContext(ctx, api)
|
||||
return api.DoWithContext(ctx, req)
|
||||
}
|
||||
|
||||
// CreateInvoiceLink holds parameters for the createInvoiceLink method.
|
||||
@@ -205,7 +205,7 @@ type CreateInvoiceLink struct {
|
||||
// See https://core.telegram.org/bots/api#createinvoicelink
|
||||
func (api *API) CreateInvoiceLink(params CreateInvoiceLink) (string, error) {
|
||||
req := NewRequest[string]("createInvoiceLink", params)
|
||||
return req.Do(api)
|
||||
return api.Do(req)
|
||||
}
|
||||
|
||||
// CreateInvoiceLinkWithContext is the context-aware variant of CreateInvoiceLink.
|
||||
@@ -214,7 +214,7 @@ func (api *API) CreateInvoiceLink(params CreateInvoiceLink) (string, error) {
|
||||
// See https://core.telegram.org/bots/api#createinvoicelink
|
||||
func (api *API) CreateInvoiceLinkWithContext(ctx context.Context, params CreateInvoiceLink) (string, error) {
|
||||
req := NewRequest[string]("createInvoiceLink", params)
|
||||
return req.DoWithContext(ctx, api)
|
||||
return api.DoWithContext(ctx, req)
|
||||
}
|
||||
|
||||
// AnswerShippingQuery holds parameters for the answerShippingQuery method.
|
||||
@@ -240,7 +240,7 @@ type AnswerShippingQuery struct {
|
||||
// See https://core.telegram.org/bots/api#answershippingquery
|
||||
func (api *API) AnswerShippingQuery(params AnswerShippingQuery) (bool, error) {
|
||||
req := NewRequest[bool]("answerShippingQuery", params)
|
||||
return req.Do(api)
|
||||
return api.Do(req)
|
||||
}
|
||||
|
||||
// AnswerShippingQueryWithContext is the context-aware variant of AnswerShippingQuery.
|
||||
@@ -249,7 +249,7 @@ func (api *API) AnswerShippingQuery(params AnswerShippingQuery) (bool, error) {
|
||||
// See https://core.telegram.org/bots/api#answershippingquery
|
||||
func (api *API) AnswerShippingQueryWithContext(ctx context.Context, params AnswerShippingQuery) (bool, error) {
|
||||
req := NewRequest[bool]("answerShippingQuery", params)
|
||||
return req.DoWithContext(ctx, api)
|
||||
return api.DoWithContext(ctx, req)
|
||||
}
|
||||
|
||||
// AnswerPreCheckoutQuery holds parameters for the answerPreCheckoutQuery method.
|
||||
@@ -274,7 +274,7 @@ type AnswerPreCheckoutQuery struct {
|
||||
// See https://core.telegram.org/bots/api#answerprecheckoutquery
|
||||
func (api *API) AnswerPreCheckoutQuery(params AnswerPreCheckoutQuery) (bool, error) {
|
||||
req := NewRequest[bool]("answerPreCheckoutQuery", params)
|
||||
return req.Do(api)
|
||||
return api.Do(req)
|
||||
}
|
||||
|
||||
// AnswerPreCheckoutQueryWithContext is the context-aware variant of AnswerPreCheckoutQuery.
|
||||
@@ -283,5 +283,5 @@ func (api *API) AnswerPreCheckoutQuery(params AnswerPreCheckoutQuery) (bool, err
|
||||
// See https://core.telegram.org/bots/api#answerprecheckoutquery
|
||||
func (api *API) AnswerPreCheckoutQueryWithContext(ctx context.Context, params AnswerPreCheckoutQuery) (bool, error) {
|
||||
req := NewRequest[bool]("answerPreCheckoutQuery", params)
|
||||
return req.DoWithContext(ctx, api)
|
||||
return api.DoWithContext(ctx, req)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user