Class: MTProto::TL::ImportBotAuthorization

Inherits:
Object
  • Object
show all
Includes:
Binary
Defined in:
lib/mtproto/tl/objects/import_bot_authorization.rb

Constant Summary collapse

CONSTRUCTOR =
0x67a3ff2c

Instance Method Summary collapse

Methods included from Binary

#b_u32, #b_u64, #u32_b, #u64_b

Constructor Details

#initialize(api_id:, api_hash:, bot_auth_token:) ⇒ ImportBotAuthorization

Returns a new instance of ImportBotAuthorization.



10
11
12
13
14
# File 'lib/mtproto/tl/objects/import_bot_authorization.rb', line 10

def initialize(api_id:, api_hash:, bot_auth_token:)
  @api_id = api_id
  @api_hash = api_hash
  @bot_auth_token = bot_auth_token
end

Instance Method Details

#serializeObject



16
17
18
19
20
21
22
23
# File 'lib/mtproto/tl/objects/import_bot_authorization.rb', line 16

def serialize
  result = u32_b(CONSTRUCTOR)
  result += u32_b(0) # flags (int, unused)
  result += u32_b(@api_id)
  result += serialize_tl_string(@api_hash)
  result += serialize_tl_string(@bot_auth_token)
  result
end