Source File
	tl_premium_get_my_boosts_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{})// PremiumGetMyBoostsRequest represents TL type `premium.getMyBoosts#be77b4a`.// Obtain which peers are we currently boosting¹, and how many boost slots² we have// left.//// Links:// 1. https://core.telegram.org/api/boost// 2. https://core.telegram.org/api/boost//// See https://core.telegram.org/method/premium.getMyBoosts for reference.type PremiumGetMyBoostsRequest struct {}// PremiumGetMyBoostsRequestTypeID is TL type id of PremiumGetMyBoostsRequest.const PremiumGetMyBoostsRequestTypeID = 0xbe77b4a// Ensuring interfaces in compile-time for PremiumGetMyBoostsRequest.var (_ bin.Encoder = &PremiumGetMyBoostsRequest{}_ bin.Decoder = &PremiumGetMyBoostsRequest{}_ bin.BareEncoder = &PremiumGetMyBoostsRequest{}_ bin.BareDecoder = &PremiumGetMyBoostsRequest{})func ( *PremiumGetMyBoostsRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *PremiumGetMyBoostsRequest) () string {if == nil {return "PremiumGetMyBoostsRequest(nil)"}type PremiumGetMyBoostsRequestreturn fmt.Sprintf("PremiumGetMyBoostsRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*PremiumGetMyBoostsRequest) () uint32 {return PremiumGetMyBoostsRequestTypeID}// TypeName returns name of type in TL schema.func (*PremiumGetMyBoostsRequest) () string {return "premium.getMyBoosts"}// TypeInfo returns info about TL type.func ( *PremiumGetMyBoostsRequest) () tdp.Type {:= tdp.Type{Name: "premium.getMyBoosts",ID: PremiumGetMyBoostsRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *PremiumGetMyBoostsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode premium.getMyBoosts#be77b4a as nil")}.PutID(PremiumGetMyBoostsRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *PremiumGetMyBoostsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode premium.getMyBoosts#be77b4a as nil")}return nil}// Decode implements bin.Decoder.func ( *PremiumGetMyBoostsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode premium.getMyBoosts#be77b4a to nil")}if := .ConsumeID(PremiumGetMyBoostsRequestTypeID); != nil {return fmt.Errorf("unable to decode premium.getMyBoosts#be77b4a: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *PremiumGetMyBoostsRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode premium.getMyBoosts#be77b4a to nil")}return nil}// PremiumGetMyBoosts invokes method premium.getMyBoosts#be77b4a returning error if any.// Obtain which peers are we currently boosting¹, and how many boost slots² we have// left.//// Links:// 1. https://core.telegram.org/api/boost// 2. https://core.telegram.org/api/boost//// See https://core.telegram.org/method/premium.getMyBoosts for reference.func ( *Client) ( context.Context) (*PremiumMyBoosts, error) {var PremiumMyBoosts:= &PremiumGetMyBoostsRequest{}if := .rpc.Invoke(, , &); != nil {return nil,}return &, nil}
![]()  | 
The pages are generated with Golds v0.6.7. (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 @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |