Class: MTProto::TL::InitConnection
- Inherits:
-
Object
- Object
- MTProto::TL::InitConnection
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/init_connection.rb
Instance Attribute Summary collapse
-
#api_id ⇒ Object
readonly
Returns the value of attribute api_id.
-
#app_version ⇒ Object
readonly
Returns the value of attribute app_version.
-
#device_model ⇒ Object
readonly
Returns the value of attribute device_model.
-
#lang_code ⇒ Object
readonly
Returns the value of attribute lang_code.
-
#lang_pack ⇒ Object
readonly
Returns the value of attribute lang_pack.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#system_lang_code ⇒ Object
readonly
Returns the value of attribute system_lang_code.
-
#system_version ⇒ Object
readonly
Returns the value of attribute system_version.
Instance Method Summary collapse
-
#initialize(api_id:, device_model:, system_version:, app_version:, system_lang_code:, lang_pack:, lang_code:, query:) ⇒ InitConnection
constructor
A new instance of InitConnection.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(api_id:, device_model:, system_version:, app_version:, system_lang_code:, lang_pack:, lang_code:, query:) ⇒ InitConnection
Returns a new instance of InitConnection.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 11 def initialize(api_id:, device_model:, system_version:, app_version:, system_lang_code:, lang_pack:, lang_code:, query:) @api_id = api_id @device_model = device_model @system_version = system_version @app_version = app_version @system_lang_code = system_lang_code @lang_pack = lang_pack @lang_code = lang_code @query = query end |
Instance Attribute Details
#api_id ⇒ Object (readonly)
Returns the value of attribute api_id.
8 9 10 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 8 def api_id @api_id end |
#app_version ⇒ Object (readonly)
Returns the value of attribute app_version.
8 9 10 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 8 def app_version @app_version end |
#device_model ⇒ Object (readonly)
Returns the value of attribute device_model.
8 9 10 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 8 def device_model @device_model end |
#lang_code ⇒ Object (readonly)
Returns the value of attribute lang_code.
8 9 10 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 8 def lang_code @lang_code end |
#lang_pack ⇒ Object (readonly)
Returns the value of attribute lang_pack.
8 9 10 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 8 def lang_pack @lang_pack end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 8 def query @query end |
#system_lang_code ⇒ Object (readonly)
Returns the value of attribute system_lang_code.
8 9 10 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 8 def system_lang_code @system_lang_code end |
#system_version ⇒ Object (readonly)
Returns the value of attribute system_version.
8 9 10 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 8 def system_version @system_version end |
Instance Method Details
#serialize ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mtproto/tl/objects/init_connection.rb', line 23 def serialize flags = 0 result = u32_b(Constructors::INIT_CONNECTION) result += u32_b(flags) result += u32_b(@api_id) result += serialize_tl_string(@device_model) result += serialize_tl_string(@system_version) result += serialize_tl_string(@app_version) result += serialize_tl_string(@system_lang_code) result += serialize_tl_string(@lang_pack) result += serialize_tl_string(@lang_code) result + @query.serialize end |