Source File
tl_stories_get_chats_to_send_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{})// StoriesGetChatsToSendRequest represents TL type `stories.getChatsToSend#a56a8b60`.// Obtain a list of channels where the user can post stories¹//// Links:// 1. https://core.telegram.org/api/stories//// See https://core.telegram.org/method/stories.getChatsToSend for reference.type StoriesGetChatsToSendRequest struct {}// StoriesGetChatsToSendRequestTypeID is TL type id of StoriesGetChatsToSendRequest.const StoriesGetChatsToSendRequestTypeID = 0xa56a8b60// Ensuring interfaces in compile-time for StoriesGetChatsToSendRequest.var (_ bin.Encoder = &StoriesGetChatsToSendRequest{}_ bin.Decoder = &StoriesGetChatsToSendRequest{}_ bin.BareEncoder = &StoriesGetChatsToSendRequest{}_ bin.BareDecoder = &StoriesGetChatsToSendRequest{})func ( *StoriesGetChatsToSendRequest) () bool {if == nil {return true}return true}// String implements fmt.Stringer.func ( *StoriesGetChatsToSendRequest) () string {if == nil {return "StoriesGetChatsToSendRequest(nil)"}type StoriesGetChatsToSendRequestreturn fmt.Sprintf("StoriesGetChatsToSendRequest%+v", (*))}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*StoriesGetChatsToSendRequest) () uint32 {return StoriesGetChatsToSendRequestTypeID}// TypeName returns name of type in TL schema.func (*StoriesGetChatsToSendRequest) () string {return "stories.getChatsToSend"}// TypeInfo returns info about TL type.func ( *StoriesGetChatsToSendRequest) () tdp.Type {:= tdp.Type{Name: "stories.getChatsToSend",ID: StoriesGetChatsToSendRequestTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{}return}// Encode implements bin.Encoder.func ( *StoriesGetChatsToSendRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode stories.getChatsToSend#a56a8b60 as nil")}.PutID(StoriesGetChatsToSendRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *StoriesGetChatsToSendRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode stories.getChatsToSend#a56a8b60 as nil")}return nil}// Decode implements bin.Decoder.func ( *StoriesGetChatsToSendRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode stories.getChatsToSend#a56a8b60 to nil")}if := .ConsumeID(StoriesGetChatsToSendRequestTypeID); != nil {return fmt.Errorf("unable to decode stories.getChatsToSend#a56a8b60: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *StoriesGetChatsToSendRequest) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode stories.getChatsToSend#a56a8b60 to nil")}return nil}// StoriesGetChatsToSend invokes method stories.getChatsToSend#a56a8b60 returning error if any.// Obtain a list of channels where the user can post stories¹//// Links:// 1. https://core.telegram.org/api/stories//// See https://core.telegram.org/method/stories.getChatsToSend for reference.func ( *Client) ( context.Context) (MessagesChatsClass, error) {var MessagesChatsBox:= &StoriesGetChatsToSendRequest{}if := .rpc.Invoke(, , &); != nil {return nil,}return .Chats, 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. |