Class: MTProto::TL::GetFile
- Inherits:
-
Object
- Object
- MTProto::TL::GetFile
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/get_file.rb
Constant Summary collapse
- CONSTRUCTOR =
0xbe5335be- INPUT_PHOTO_FILE_LOCATION =
0x40181ffe
Instance Method Summary collapse
-
#initialize(location:, offset: 0, limit: 1024 * 1024) ⇒ GetFile
constructor
location: { id:, access_hash:, file_reference: (binary String), thumb_size: (String) }.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(location:, offset: 0, limit: 1024 * 1024) ⇒ GetFile
location: { id:, access_hash:, file_reference: (binary String), thumb_size: (String) }
12 13 14 15 16 |
# File 'lib/mtproto/tl/objects/get_file.rb', line 12 def initialize(location:, offset: 0, limit: 1024 * 1024) @location = location @offset = offset @limit = limit end |
Instance Method Details
#serialize ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/mtproto/tl/objects/get_file.rb', line 18 def serialize result = u32_b(CONSTRUCTOR) result += u32_b(0) # flags result += serialize_location result += u64_b(@offset) result += u32_b(@limit) result end |