Source File
tl_payments_get_stars_topup_options_gen.go
Belonging Package
github.com/gotd/td/tg
// Code generated by gotdgen, DO NOT EDIT.package tgimport ()// No-op definition for keeping imports.var (_ = bin.Buffer{}_ = context.Background()_ = fmt.Stringer(nil)_ = strings.Builder{}_ = errors.Is_ = multierr.AppendInto_ = sort.Ints_ = tdp.Format_ = tgerr.Error{}_ = tdjson.Encoder{})// PaymentsGetStarsTopupOptionsRequest represents TL type `payments.getStarsTopupOptions#c00ec7d3`.// Obtain a list of Telegram Stars topup options »¹ as starsTopupOption² constructors.//// Links:// 1. https://core.telegram.org/api/stars#buying-or-gifting-stars// 2. https://core.telegram.org/constructor/starsTopupOption//// See https://core.telegram.org/method/payments.getStarsTopupOptions for reference.type PaymentsGetStarsTopupOptionsRequest struct {}// PaymentsGetStarsTopupOptionsRequestTypeID is TL type id of PaymentsGetStarsTopupOptionsRequest.const PaymentsGetStarsTopupOptionsRequestTypeID = 0xc00ec7d3// Ensuring interfaces in compile-time for PaymentsGetStarsTopupOptionsRequest.var (_ bin.Encoder = &PaymentsGetStarsTopupOptionsRequest{}_ bin.Decoder = &PaymentsGetStarsTopupOptionsRequest{}_ bin.BareEncoder = &PaymentsGetStarsTopupOptionsRequest{}_ bin.BareDecoder = &PaymentsGetStarsTopupOptionsRequest{})func ( *PaymentsGetStarsTopupOptionsRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *PaymentsGetStarsTopupOptionsRequest) () string {if == nil {return "PaymentsGetStarsTopupOptionsRequest(nil)"}type PaymentsGetStarsTopupOptionsRequestreturn fmt.Sprintf("PaymentsGetStarsTopupOptionsRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*PaymentsGetStarsTopupOptionsRequest) () uint32 {return PaymentsGetStarsTopupOptionsRequestTypeID}// TypeName returns name of type in TL schema.func (*PaymentsGetStarsTopupOptionsRequest) () string {return "payments.getStarsTopupOptions"}// TypeInfo returns info about TL type.func ( *PaymentsGetStarsTopupOptionsRequest) () tdp.Type {:= tdp.Type{Name: "payments.getStarsTopupOptions",ID: PaymentsGetStarsTopupOptionsRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *PaymentsGetStarsTopupOptionsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode payments.getStarsTopupOptions#c00ec7d3 as nil")}.PutID(PaymentsGetStarsTopupOptionsRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *PaymentsGetStarsTopupOptionsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode payments.getStarsTopupOptions#c00ec7d3 as nil")}return nil}// Decode implements bin.Decoder.func ( *PaymentsGetStarsTopupOptionsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode payments.getStarsTopupOptions#c00ec7d3 to nil")}if := .ConsumeID(PaymentsGetStarsTopupOptionsRequestTypeID); != nil {return fmt.Errorf("unable to decode payments.getStarsTopupOptions#c00ec7d3: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *PaymentsGetStarsTopupOptionsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode payments.getStarsTopupOptions#c00ec7d3 to nil")}return nil}// PaymentsGetStarsTopupOptions invokes method payments.getStarsTopupOptions#c00ec7d3 returning error if any.// Obtain a list of Telegram Stars topup options »¹ as starsTopupOption² constructors.//// Links:// 1. https://core.telegram.org/api/stars#buying-or-gifting-stars// 2. https://core.telegram.org/constructor/starsTopupOption//// See https://core.telegram.org/method/payments.getStarsTopupOptions for reference.func ( *Client) ( context.Context) ([]StarsTopupOption, error) {var StarsTopupOptionVector:= &PaymentsGetStarsTopupOptionsRequest{}if := .rpc.Invoke(, , &); != nil {return nil,}return []StarsTopupOption(.Elems), nil}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |