Fix tl scheme

This commit is contained in:
c0re100 2023-02-05 07:22:52 +08:00
parent 869b97df28
commit d0f51e73ee
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 39801 additions and 39813 deletions

View file

@ -4413,7 +4413,8 @@ func GetTextEntities(req *GetTextEntitiesRequest) (*TextEntities, error) {
// deprecated
// Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously
func (client *Client) GetTextEntities(req *GetTextEntitiesRequest) (*TextEntities, error) {
return GetTextEntities(req)}
return GetTextEntities(req)
}
type ParseTextEntitiesRequest struct {
// The text to parse
@ -4447,7 +4448,8 @@ func ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
// deprecated
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
func (client *Client) ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
return ParseTextEntities(req)}
return ParseTextEntities(req)
}
type ParseMarkdownRequest struct {
// The text to parse. For example, "__italic__ ~~strikethrough~~ ||spoiler|| **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**"
@ -4478,7 +4480,8 @@ func ParseMarkdown(req *ParseMarkdownRequest) (*FormattedText, error) {
// deprecated
// Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously
func (client *Client) ParseMarkdown(req *ParseMarkdownRequest) (*FormattedText, error) {
return ParseMarkdown(req)}
return ParseMarkdown(req)
}
type GetMarkdownTextRequest struct {
// The text
@ -4509,7 +4512,8 @@ func GetMarkdownText(req *GetMarkdownTextRequest) (*FormattedText, error) {
// deprecated
// Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously
func (client *Client) GetMarkdownText(req *GetMarkdownTextRequest) (*FormattedText, error) {
return GetMarkdownText(req)}
return GetMarkdownText(req)
}
type GetFileMimeTypeRequest struct {
// The name of the file or path to the file
@ -4540,7 +4544,8 @@ func GetFileMimeType(req *GetFileMimeTypeRequest) (*Text, error) {
// deprecated
// Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously
func (client *Client) GetFileMimeType(req *GetFileMimeTypeRequest) (*Text, error) {
return GetFileMimeType(req)}
return GetFileMimeType(req)
}
type GetFileExtensionRequest struct {
// The MIME type of the file
@ -4571,7 +4576,8 @@ func GetFileExtension(req *GetFileExtensionRequest) (*Text, error) {
// deprecated
// Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously
func (client *Client) GetFileExtension(req *GetFileExtensionRequest) (*Text, error) {
return GetFileExtension(req)}
return GetFileExtension(req)
}
type CleanFileNameRequest struct {
// File name or path to the file
@ -4602,7 +4608,8 @@ func CleanFileName(req *CleanFileNameRequest) (*Text, error) {
// deprecated
// Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously
func (client *Client) CleanFileName(req *CleanFileNameRequest) (*Text, error) {
return CleanFileName(req)}
return CleanFileName(req)
}
type GetLanguagePackStringRequest struct {
// Path to the language pack database in which strings are stored
@ -4654,7 +4661,8 @@ func GetLanguagePackString(req *GetLanguagePackStringRequest) (LanguagePackStrin
// deprecated
// Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously
func (client *Client) GetLanguagePackString(req *GetLanguagePackStringRequest) (LanguagePackStringValue, error) {
return GetLanguagePackString(req)}
return GetLanguagePackString(req)
}
type GetJsonValueRequest struct {
// The JSON-serialized string
@ -4706,7 +4714,8 @@ func GetJsonValue(req *GetJsonValueRequest) (JsonValue, error) {
// deprecated
// Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously
func (client *Client) GetJsonValue(req *GetJsonValueRequest) (JsonValue, error) {
return GetJsonValue(req)}
return GetJsonValue(req)
}
type GetJsonStringRequest struct {
// The JsonValue object
@ -4737,7 +4746,8 @@ func GetJsonString(req *GetJsonStringRequest) (*Text, error) {
// deprecated
// Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously
func (client *Client) GetJsonString(req *GetJsonStringRequest) (*Text, error) {
return GetJsonString(req)}
return GetJsonString(req)
}
type GetThemeParametersJsonStringRequest struct {
// Theme parameters to convert to JSON
@ -4768,7 +4778,8 @@ func GetThemeParametersJsonString(req *GetThemeParametersJsonStringRequest) (*Te
// deprecated
// Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously
func (client *Client) GetThemeParametersJsonString(req *GetThemeParametersJsonStringRequest) (*Text, error) {
return GetThemeParametersJsonString(req)}
return GetThemeParametersJsonString(req)
}
type SetPollAnswerRequest struct {
// Identifier of the chat to which the poll belongs
@ -6566,7 +6577,8 @@ func GetChatFilterDefaultIconName(req *GetChatFilterDefaultIconNameRequest) (*Te
// deprecated
// Returns default icon name for a filter. Can be called synchronously
func (client *Client) GetChatFilterDefaultIconName(req *GetChatFilterDefaultIconNameRequest) (*Text, error) {
return GetChatFilterDefaultIconName(req)}
return GetChatFilterDefaultIconName(req)
}
type SetChatTitleRequest struct {
// Chat identifier
@ -13586,7 +13598,8 @@ func GetPushReceiverId(req *GetPushReceiverIdRequest) (*PushReceiverId, error) {
// deprecated
// Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously
func (client *Client) GetPushReceiverId(req *GetPushReceiverIdRequest) (*PushReceiverId, error) {
return GetPushReceiverId(req)}
return GetPushReceiverId(req)
}
type GetRecentlyVisitedTMeUrlsRequest struct {
// Google Play referrer to identify the user
@ -13713,7 +13726,8 @@ func GetOption(req *GetOptionRequest) (OptionValue, error) {
// deprecated
// Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization. Can be called synchronously for options "version" and "commit_hash"
func (client *Client) GetOption(req *GetOptionRequest) (OptionValue, error) {
return GetOption(req)}
return GetOption(req)
}
type SetOptionRequest struct {
// The name of the option
@ -15775,7 +15789,8 @@ func GetPhoneNumberInfoSync(req *GetPhoneNumberInfoSyncRequest) (*PhoneNumberInf
// deprecated
// Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously
func (client *Client) GetPhoneNumberInfoSync(req *GetPhoneNumberInfoSyncRequest) (*PhoneNumberInfo, error) {
return GetPhoneNumberInfoSync(req)}
return GetPhoneNumberInfoSync(req)
}
// Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
func (client *Client) GetApplicationDownloadLink() (*HttpUrl, error) {
@ -16138,7 +16153,8 @@ func SetLogStream(req *SetLogStreamRequest) (*Ok, error) {
// deprecated
// Sets new log stream for internal logging of TDLib. Can be called synchronously
func (client *Client) SetLogStream(req *SetLogStreamRequest) (*Ok, error) {
return SetLogStream(req)}
return SetLogStream(req)
}
// Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously
func GetLogStream() (LogStream, error) {
@ -16174,7 +16190,8 @@ func GetLogStream() (LogStream, error) {
// deprecated
// Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously
func (client *Client) GetLogStream() (LogStream, error) {
return GetLogStream()}
return GetLogStream()
}
type SetLogVerbosityLevelRequest struct {
// New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging
@ -16205,7 +16222,8 @@ func SetLogVerbosityLevel(req *SetLogVerbosityLevelRequest) (*Ok, error) {
// deprecated
// Sets the verbosity level of the internal logging of TDLib. Can be called synchronously
func (client *Client) SetLogVerbosityLevel(req *SetLogVerbosityLevelRequest) (*Ok, error) {
return SetLogVerbosityLevel(req)}
return SetLogVerbosityLevel(req)
}
// Returns current verbosity level of the internal logging of TDLib. Can be called synchronously
func GetLogVerbosityLevel() (*LogVerbosityLevel, error) {
@ -16229,7 +16247,8 @@ func GetLogVerbosityLevel() (*LogVerbosityLevel, error) {
// deprecated
// Returns current verbosity level of the internal logging of TDLib. Can be called synchronously
func (client *Client) GetLogVerbosityLevel() (*LogVerbosityLevel, error) {
return GetLogVerbosityLevel()}
return GetLogVerbosityLevel()
}
// Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously
func GetLogTags() (*LogTags, error) {
@ -16253,7 +16272,8 @@ func GetLogTags() (*LogTags, error) {
// deprecated
// Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously
func (client *Client) GetLogTags() (*LogTags, error) {
return GetLogTags()}
return GetLogTags()
}
type SetLogTagVerbosityLevelRequest struct {
// Logging tag to change verbosity level
@ -16287,7 +16307,8 @@ func SetLogTagVerbosityLevel(req *SetLogTagVerbosityLevelRequest) (*Ok, error) {
// deprecated
// Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously
func (client *Client) SetLogTagVerbosityLevel(req *SetLogTagVerbosityLevelRequest) (*Ok, error) {
return SetLogTagVerbosityLevel(req)}
return SetLogTagVerbosityLevel(req)
}
type GetLogTagVerbosityLevelRequest struct {
// Logging tag to change verbosity level
@ -16318,7 +16339,8 @@ func GetLogTagVerbosityLevel(req *GetLogTagVerbosityLevelRequest) (*LogVerbosity
// deprecated
// Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously
func (client *Client) GetLogTagVerbosityLevel(req *GetLogTagVerbosityLevelRequest) (*LogVerbosityLevel, error) {
return GetLogTagVerbosityLevel(req)}
return GetLogTagVerbosityLevel(req)
}
type AddLogMessageRequest struct {
// The minimum verbosity level needed for the message to be logged; 0-1023
@ -16352,7 +16374,8 @@ func AddLogMessage(req *AddLogMessageRequest) (*Ok, error) {
// deprecated
// Adds a message to TDLib internal log. Can be called synchronously
func (client *Client) AddLogMessage(req *AddLogMessageRequest) (*Ok, error) {
return AddLogMessage(req)}
return AddLogMessage(req)
}
type GetUserSupportInfoRequest struct {
// User identifier
@ -17058,4 +17081,5 @@ func TestReturnError(req *TestReturnErrorRequest) (*Error, error) {
// deprecated
// Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously
func (client *Client) TestReturnError(req *TestReturnErrorRequest) (*Error, error) {
return TestReturnError(req)}
return TestReturnError(req)
}

View file

@ -322,7 +322,6 @@ const (
ClassPremiumFeatures = "PremiumFeatures"
ClassPremiumFeaturePromotionAnimation = "PremiumFeaturePromotionAnimation"
ClassPremiumState = "PremiumState"
Class//-To = "https://my.telegram.org"
ClassPushReceiverId = "PushReceiverId"
ClassBackground = "Background"
ClassBackgrounds = "Backgrounds"
@ -1134,7 +1133,6 @@ const (
TypePremiumState = "premiumState"
TypeStorePaymentPurposePremiumSubscription = "storePaymentPurposePremiumSubscription"
TypeStorePaymentPurposeGiftedPremium = "storePaymentPurposeGiftedPremium"
Type//-To = "//-To"
TypeDeviceTokenFirebaseCloudMessaging = "deviceTokenFirebaseCloudMessaging"
TypeDeviceTokenApplePush = "deviceTokenApplePush"
TypeDeviceTokenApplePushVoIP = "deviceTokenApplePushVoIP"
@ -1899,7 +1897,7 @@ type StorePaymentPurpose interface {
StorePaymentPurposeType() string
}
// Represents a data needed to subscribe for push notifications through registerDevice method.
// Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
type DeviceToken interface {
DeviceTokenType() string
}
@ -26953,27 +26951,6 @@ func (*StorePaymentPurposeGiftedPremium) StorePaymentPurposeType() string {
return TypeStorePaymentPurposeGiftedPremium
}
//
type //-To struct{
meta
}
func (entity *//-To) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub //-To
return json.Marshal((*stub)(entity))
}
func (*//-To) GetClass() string {
return Class//-To
}
func (*//-To) GetType() string {
return Type//-To
}
// A token for Firebase Cloud Messaging
type DeviceTokenFirebaseCloudMessaging struct {
meta
@ -39488,4 +39465,3 @@ func (*TestVectorStringObject) GetClass() string {
func (*TestVectorStringObject) GetType() string {
return TypeTestVectorStringObject
}

View file

@ -11618,14 +11618,6 @@ func UnmarshalStorePaymentPurposeGiftedPremium(data json.RawMessage) (*StorePaym
return &resp, err
}
func Unmarshal//-To(data json.RawMessage) (*//-To, error) {
var resp //-To
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) {
var resp DeviceTokenFirebaseCloudMessaging
@ -17172,9 +17164,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStorePaymentPurposeGiftedPremium:
return UnmarshalStorePaymentPurposeGiftedPremium(data)
case Type//-To:
return Unmarshal//-To(data)
case TypeDeviceTokenFirebaseCloudMessaging:
return UnmarshalDeviceTokenFirebaseCloudMessaging(data)

View file

@ -3883,8 +3883,7 @@ storePaymentPurposePremiumSubscription is_restore:Bool is_upgrade:Bool = StorePa
storePaymentPurposeGiftedPremium user_id:int53 currency:string amount:int53 = StorePaymentPurpose;
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method.
//-To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
//@description A token for Firebase Cloud Messaging @token Device registration token; may be empty to deregister a device @encrypt True, if push notifications must be additionally encrypted
deviceTokenFirebaseCloudMessaging token:string encrypt:Bool = DeviceToken;