Source File
tl_payments_get_stars_giveaway_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{})// PaymentsGetStarsGiveawayOptionsRequest represents TL type `payments.getStarsGiveawayOptions#bd1efd3e`.// Fetch a list of star giveaway options »¹.//// Links:// 1. https://core.telegram.org/api/giveaways#star-giveaways//// See https://core.telegram.org/method/payments.getStarsGiveawayOptions for reference.type PaymentsGetStarsGiveawayOptionsRequest struct {}// PaymentsGetStarsGiveawayOptionsRequestTypeID is TL type id of PaymentsGetStarsGiveawayOptionsRequest.const PaymentsGetStarsGiveawayOptionsRequestTypeID = 0xbd1efd3e// Ensuring interfaces in compile-time for PaymentsGetStarsGiveawayOptionsRequest.var (_ bin.Encoder = &PaymentsGetStarsGiveawayOptionsRequest{}_ bin.Decoder = &PaymentsGetStarsGiveawayOptionsRequest{}_ bin.BareEncoder = &PaymentsGetStarsGiveawayOptionsRequest{}_ bin.BareDecoder = &PaymentsGetStarsGiveawayOptionsRequest{})func ( *PaymentsGetStarsGiveawayOptionsRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *PaymentsGetStarsGiveawayOptionsRequest) () string {if == nil {return "PaymentsGetStarsGiveawayOptionsRequest(nil)"}type PaymentsGetStarsGiveawayOptionsRequestreturn fmt.Sprintf("PaymentsGetStarsGiveawayOptionsRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*PaymentsGetStarsGiveawayOptionsRequest) () uint32 {return PaymentsGetStarsGiveawayOptionsRequestTypeID}// TypeName returns name of type in TL schema.func (*PaymentsGetStarsGiveawayOptionsRequest) () string {return "payments.getStarsGiveawayOptions"}// TypeInfo returns info about TL type.func ( *PaymentsGetStarsGiveawayOptionsRequest) () tdp.Type {:= tdp.Type{Name: "payments.getStarsGiveawayOptions",ID: PaymentsGetStarsGiveawayOptionsRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *PaymentsGetStarsGiveawayOptionsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode payments.getStarsGiveawayOptions#bd1efd3e as nil")}.PutID(PaymentsGetStarsGiveawayOptionsRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *PaymentsGetStarsGiveawayOptionsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode payments.getStarsGiveawayOptions#bd1efd3e as nil")}return nil}// Decode implements bin.Decoder.func ( *PaymentsGetStarsGiveawayOptionsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode payments.getStarsGiveawayOptions#bd1efd3e to nil")}if := .ConsumeID(PaymentsGetStarsGiveawayOptionsRequestTypeID); != nil {return fmt.Errorf("unable to decode payments.getStarsGiveawayOptions#bd1efd3e: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *PaymentsGetStarsGiveawayOptionsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode payments.getStarsGiveawayOptions#bd1efd3e to nil")}return nil}// PaymentsGetStarsGiveawayOptions invokes method payments.getStarsGiveawayOptions#bd1efd3e returning error if any.// Fetch a list of star giveaway options »¹.//// Links:// 1. https://core.telegram.org/api/giveaways#star-giveaways//// See https://core.telegram.org/method/payments.getStarsGiveawayOptions for reference.func ( *Client) ( context.Context) ([]StarsGiveawayOption, error) {var StarsGiveawayOptionVector:= &PaymentsGetStarsGiveawayOptionsRequest{}if := .rpc.Invoke(, , &); != nil {return nil,}return []StarsGiveawayOption(.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. |