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 // deprecated
// Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously // 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) { func (client *Client) GetTextEntities(req *GetTextEntitiesRequest) (*TextEntities, error) {
return GetTextEntities(req)} return GetTextEntities(req)
}
type ParseTextEntitiesRequest struct { type ParseTextEntitiesRequest struct {
// The text to parse // The text to parse
@ -4447,7 +4448,8 @@ func ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
// deprecated // deprecated
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously // 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) { func (client *Client) ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
return ParseTextEntities(req)} return ParseTextEntities(req)
}
type ParseMarkdownRequest struct { type ParseMarkdownRequest struct {
// The text to parse. For example, "__italic__ ~~strikethrough~~ ||spoiler|| **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**" // 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 // deprecated
// Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously // Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously
func (client *Client) ParseMarkdown(req *ParseMarkdownRequest) (*FormattedText, error) { func (client *Client) ParseMarkdown(req *ParseMarkdownRequest) (*FormattedText, error) {
return ParseMarkdown(req)} return ParseMarkdown(req)
}
type GetMarkdownTextRequest struct { type GetMarkdownTextRequest struct {
// The text // The text
@ -4509,7 +4512,8 @@ func GetMarkdownText(req *GetMarkdownTextRequest) (*FormattedText, error) {
// deprecated // 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 // 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) { func (client *Client) GetMarkdownText(req *GetMarkdownTextRequest) (*FormattedText, error) {
return GetMarkdownText(req)} return GetMarkdownText(req)
}
type GetFileMimeTypeRequest struct { type GetFileMimeTypeRequest struct {
// The name of the file or path to the file // The name of the file or path to the file
@ -4540,7 +4544,8 @@ func GetFileMimeType(req *GetFileMimeTypeRequest) (*Text, error) {
// deprecated // deprecated
// Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously // 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) { func (client *Client) GetFileMimeType(req *GetFileMimeTypeRequest) (*Text, error) {
return GetFileMimeType(req)} return GetFileMimeType(req)
}
type GetFileExtensionRequest struct { type GetFileExtensionRequest struct {
// The MIME type of the file // The MIME type of the file
@ -4571,7 +4576,8 @@ func GetFileExtension(req *GetFileExtensionRequest) (*Text, error) {
// deprecated // deprecated
// Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously // 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) { func (client *Client) GetFileExtension(req *GetFileExtensionRequest) (*Text, error) {
return GetFileExtension(req)} return GetFileExtension(req)
}
type CleanFileNameRequest struct { type CleanFileNameRequest struct {
// File name or path to the file // File name or path to the file
@ -4602,7 +4608,8 @@ func CleanFileName(req *CleanFileNameRequest) (*Text, error) {
// deprecated // 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 // 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) { func (client *Client) CleanFileName(req *CleanFileNameRequest) (*Text, error) {
return CleanFileName(req)} return CleanFileName(req)
}
type GetLanguagePackStringRequest struct { type GetLanguagePackStringRequest struct {
// Path to the language pack database in which strings are stored // Path to the language pack database in which strings are stored
@ -4654,7 +4661,8 @@ func GetLanguagePackString(req *GetLanguagePackStringRequest) (LanguagePackStrin
// deprecated // 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 // 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) { func (client *Client) GetLanguagePackString(req *GetLanguagePackStringRequest) (LanguagePackStringValue, error) {
return GetLanguagePackString(req)} return GetLanguagePackString(req)
}
type GetJsonValueRequest struct { type GetJsonValueRequest struct {
// The JSON-serialized string // The JSON-serialized string
@ -4706,7 +4714,8 @@ func GetJsonValue(req *GetJsonValueRequest) (JsonValue, error) {
// deprecated // deprecated
// Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously // Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously
func (client *Client) GetJsonValue(req *GetJsonValueRequest) (JsonValue, error) { func (client *Client) GetJsonValue(req *GetJsonValueRequest) (JsonValue, error) {
return GetJsonValue(req)} return GetJsonValue(req)
}
type GetJsonStringRequest struct { type GetJsonStringRequest struct {
// The JsonValue object // The JsonValue object
@ -4737,7 +4746,8 @@ func GetJsonString(req *GetJsonStringRequest) (*Text, error) {
// deprecated // deprecated
// Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously // Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously
func (client *Client) GetJsonString(req *GetJsonStringRequest) (*Text, error) { func (client *Client) GetJsonString(req *GetJsonStringRequest) (*Text, error) {
return GetJsonString(req)} return GetJsonString(req)
}
type GetThemeParametersJsonStringRequest struct { type GetThemeParametersJsonStringRequest struct {
// Theme parameters to convert to JSON // Theme parameters to convert to JSON
@ -4768,7 +4778,8 @@ func GetThemeParametersJsonString(req *GetThemeParametersJsonStringRequest) (*Te
// deprecated // deprecated
// Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously // Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously
func (client *Client) GetThemeParametersJsonString(req *GetThemeParametersJsonStringRequest) (*Text, error) { func (client *Client) GetThemeParametersJsonString(req *GetThemeParametersJsonStringRequest) (*Text, error) {
return GetThemeParametersJsonString(req)} return GetThemeParametersJsonString(req)
}
type SetPollAnswerRequest struct { type SetPollAnswerRequest struct {
// Identifier of the chat to which the poll belongs // Identifier of the chat to which the poll belongs
@ -6566,7 +6577,8 @@ func GetChatFilterDefaultIconName(req *GetChatFilterDefaultIconNameRequest) (*Te
// deprecated // deprecated
// Returns default icon name for a filter. Can be called synchronously // Returns default icon name for a filter. Can be called synchronously
func (client *Client) GetChatFilterDefaultIconName(req *GetChatFilterDefaultIconNameRequest) (*Text, error) { func (client *Client) GetChatFilterDefaultIconName(req *GetChatFilterDefaultIconNameRequest) (*Text, error) {
return GetChatFilterDefaultIconName(req)} return GetChatFilterDefaultIconName(req)
}
type SetChatTitleRequest struct { type SetChatTitleRequest struct {
// Chat identifier // Chat identifier
@ -13586,7 +13598,8 @@ func GetPushReceiverId(req *GetPushReceiverIdRequest) (*PushReceiverId, error) {
// deprecated // deprecated
// Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously // 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) { func (client *Client) GetPushReceiverId(req *GetPushReceiverIdRequest) (*PushReceiverId, error) {
return GetPushReceiverId(req)} return GetPushReceiverId(req)
}
type GetRecentlyVisitedTMeUrlsRequest struct { type GetRecentlyVisitedTMeUrlsRequest struct {
// Google Play referrer to identify the user // Google Play referrer to identify the user
@ -13713,7 +13726,8 @@ func GetOption(req *GetOptionRequest) (OptionValue, error) {
// deprecated // 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" // 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) { func (client *Client) GetOption(req *GetOptionRequest) (OptionValue, error) {
return GetOption(req)} return GetOption(req)
}
type SetOptionRequest struct { type SetOptionRequest struct {
// The name of the option // The name of the option
@ -15775,7 +15789,8 @@ func GetPhoneNumberInfoSync(req *GetPhoneNumberInfoSyncRequest) (*PhoneNumberInf
// deprecated // 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 // 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) { 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 // 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) { func (client *Client) GetApplicationDownloadLink() (*HttpUrl, error) {
@ -16138,7 +16153,8 @@ func SetLogStream(req *SetLogStreamRequest) (*Ok, error) {
// deprecated // deprecated
// Sets new log stream for internal logging of TDLib. Can be called synchronously // Sets new log stream for internal logging of TDLib. Can be called synchronously
func (client *Client) SetLogStream(req *SetLogStreamRequest) (*Ok, error) { 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 // Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously
func GetLogStream() (LogStream, error) { func GetLogStream() (LogStream, error) {
@ -16174,7 +16190,8 @@ func GetLogStream() (LogStream, error) {
// deprecated // deprecated
// Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously // Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously
func (client *Client) GetLogStream() (LogStream, error) { func (client *Client) GetLogStream() (LogStream, error) {
return GetLogStream()} return GetLogStream()
}
type SetLogVerbosityLevelRequest struct { 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 // 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 // deprecated
// Sets the verbosity level of the internal logging of TDLib. Can be called synchronously // Sets the verbosity level of the internal logging of TDLib. Can be called synchronously
func (client *Client) SetLogVerbosityLevel(req *SetLogVerbosityLevelRequest) (*Ok, error) { 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 // Returns current verbosity level of the internal logging of TDLib. Can be called synchronously
func GetLogVerbosityLevel() (*LogVerbosityLevel, error) { func GetLogVerbosityLevel() (*LogVerbosityLevel, error) {
@ -16229,7 +16247,8 @@ func GetLogVerbosityLevel() (*LogVerbosityLevel, error) {
// deprecated // deprecated
// Returns current verbosity level of the internal logging of TDLib. Can be called synchronously // Returns current verbosity level of the internal logging of TDLib. Can be called synchronously
func (client *Client) GetLogVerbosityLevel() (*LogVerbosityLevel, error) { 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 // Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously
func GetLogTags() (*LogTags, error) { func GetLogTags() (*LogTags, error) {
@ -16253,7 +16272,8 @@ func GetLogTags() (*LogTags, error) {
// deprecated // deprecated
// Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously // 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) { func (client *Client) GetLogTags() (*LogTags, error) {
return GetLogTags()} return GetLogTags()
}
type SetLogTagVerbosityLevelRequest struct { type SetLogTagVerbosityLevelRequest struct {
// Logging tag to change verbosity level // Logging tag to change verbosity level
@ -16287,7 +16307,8 @@ func SetLogTagVerbosityLevel(req *SetLogTagVerbosityLevelRequest) (*Ok, error) {
// deprecated // deprecated
// Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously // Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously
func (client *Client) SetLogTagVerbosityLevel(req *SetLogTagVerbosityLevelRequest) (*Ok, error) { func (client *Client) SetLogTagVerbosityLevel(req *SetLogTagVerbosityLevelRequest) (*Ok, error) {
return SetLogTagVerbosityLevel(req)} return SetLogTagVerbosityLevel(req)
}
type GetLogTagVerbosityLevelRequest struct { type GetLogTagVerbosityLevelRequest struct {
// Logging tag to change verbosity level // Logging tag to change verbosity level
@ -16318,7 +16339,8 @@ func GetLogTagVerbosityLevel(req *GetLogTagVerbosityLevelRequest) (*LogVerbosity
// deprecated // deprecated
// Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously // Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously
func (client *Client) GetLogTagVerbosityLevel(req *GetLogTagVerbosityLevelRequest) (*LogVerbosityLevel, error) { func (client *Client) GetLogTagVerbosityLevel(req *GetLogTagVerbosityLevelRequest) (*LogVerbosityLevel, error) {
return GetLogTagVerbosityLevel(req)} return GetLogTagVerbosityLevel(req)
}
type AddLogMessageRequest struct { type AddLogMessageRequest struct {
// The minimum verbosity level needed for the message to be logged; 0-1023 // The minimum verbosity level needed for the message to be logged; 0-1023
@ -16352,7 +16374,8 @@ func AddLogMessage(req *AddLogMessageRequest) (*Ok, error) {
// deprecated // deprecated
// Adds a message to TDLib internal log. Can be called synchronously // Adds a message to TDLib internal log. Can be called synchronously
func (client *Client) AddLogMessage(req *AddLogMessageRequest) (*Ok, error) { func (client *Client) AddLogMessage(req *AddLogMessageRequest) (*Ok, error) {
return AddLogMessage(req)} return AddLogMessage(req)
}
type GetUserSupportInfoRequest struct { type GetUserSupportInfoRequest struct {
// User identifier // User identifier
@ -17058,4 +17081,5 @@ func TestReturnError(req *TestReturnErrorRequest) (*Error, error) {
// deprecated // deprecated
// Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously // 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) { func (client *Client) TestReturnError(req *TestReturnErrorRequest) (*Error, error) {
return TestReturnError(req)} return TestReturnError(req)
}

File diff suppressed because it is too large Load diff

View file

@ -11618,14 +11618,6 @@ func UnmarshalStorePaymentPurposeGiftedPremium(data json.RawMessage) (*StorePaym
return &resp, err 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) { func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) {
var resp DeviceTokenFirebaseCloudMessaging var resp DeviceTokenFirebaseCloudMessaging
@ -17172,9 +17164,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStorePaymentPurposeGiftedPremium: case TypeStorePaymentPurposeGiftedPremium:
return UnmarshalStorePaymentPurposeGiftedPremium(data) return UnmarshalStorePaymentPurposeGiftedPremium(data)
case Type//-To:
return Unmarshal//-To(data)
case TypeDeviceTokenFirebaseCloudMessaging: case TypeDeviceTokenFirebaseCloudMessaging:
return UnmarshalDeviceTokenFirebaseCloudMessaging(data) 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; storePaymentPurposeGiftedPremium user_id:int53 currency:string amount:int53 = StorePaymentPurpose;
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. //@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
//-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 //@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; deviceTokenFirebaseCloudMessaging token:string encrypt:Bool = DeviceToken;