Class: TD::Types::TdlibParameters

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/tdlib_parameters.rb

Overview

Contains parameters for TDLib initialization.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#api_hashString?

Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.

Returns:

  • (String, nil)

    the current value of api_hash



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def api_hash
  @api_hash
end

#api_idInteger?

Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.

Returns:

  • (Integer, nil)

    the current value of api_id



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def api_id
  @api_id
end

#application_versionString

Application version; must be non-empty.

Returns:

  • (String)

    the current value of application_version



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def application_version
  @application_version
end

#database_directoryString?

The path to the directory for the persistent database; if empty, the current working directory will be used.

Returns:

  • (String, nil)

    the current value of database_directory



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def database_directory
  @database_directory
end

#device_modelString

Model of the device the application is being run on; must be non-empty.

Returns:

  • (String)

    the current value of device_model



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def device_model
  @device_model
end

#enable_storage_optimizerBoolean?

If set to true, old files will automatically be deleted.

Returns:

  • (Boolean, nil)

    the current value of enable_storage_optimizer



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def enable_storage_optimizer
  @enable_storage_optimizer
end

#files_directoryString?

The path to the directory for storing files; if empty, database_directory will be used.

Returns:

  • (String, nil)

    the current value of files_directory



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def files_directory
  @files_directory
end

#ignore_file_namesBoolean?

If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name.

Returns:

  • (Boolean, nil)

    the current value of ignore_file_names



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def ignore_file_names
  @ignore_file_names
end

#system_language_codeString

IETF language tag of the user's operating system language; must be non-empty.

Returns:

  • (String)

    the current value of system_language_code



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def system_language_code
  @system_language_code
end

#system_versionString

Version of the operating system the application is being run on; must be non-empty.

Returns:

  • (String)

    the current value of system_version



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def system_version
  @system_version
end

#use_chat_info_databaseBoolean?

If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database.

Returns:

  • (Boolean, nil)

    the current value of use_chat_info_database



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def use_chat_info_database
  @use_chat_info_database
end

#use_file_databaseBoolean?

If set to true, information about downloaded and uploaded files will be saved between application restarts.

Returns:

  • (Boolean, nil)

    the current value of use_file_database



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def use_file_database
  @use_file_database
end

#use_message_databaseBoolean?

If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database.

Returns:

  • (Boolean, nil)

    the current value of use_message_database



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def use_message_database
  @use_message_database
end

#use_secret_chatsBoolean?

If set to true, support for secret chats will be enabled.

Returns:

  • (Boolean, nil)

    the current value of use_secret_chats



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def use_secret_chats
  @use_secret_chats
end

#use_test_dcBoolean?

If set to true, the Telegram test environment will be used instead of the production environment.

Returns:

  • (Boolean, nil)

    the current value of use_test_dc



29
30
31
# File 'lib/tdlib/types/tdlib_parameters.rb', line 29

def use_test_dc
  @use_test_dc
end