Class: MTProto::TL::GetChannelDifference
- Inherits:
-
Object
- Object
- MTProto::TL::GetChannelDifference
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/get_channel_difference.rb
Instance Method Summary collapse
-
#initialize(channel:, pts:, limit: 100, force: false) ⇒ GetChannelDifference
constructor
A new instance of GetChannelDifference.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(channel:, pts:, limit: 100, force: false) ⇒ GetChannelDifference
Returns a new instance of GetChannelDifference.
8 9 10 11 12 13 |
# File 'lib/mtproto/tl/objects/get_channel_difference.rb', line 8 def initialize(channel:, pts:, limit: 100, force: false) @channel = channel @pts = pts @limit = limit @force = force end |
Instance Method Details
#serialize ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mtproto/tl/objects/get_channel_difference.rb', line 15 def serialize flags = 0 flags |= (1 << 0) if @force result = u32_b(Constructors::UPDATES_GET_CHANNEL_DIFFERENCE) result += u32_b(flags) result += serialize_input_channel result += u32_b(Constructors::CHANNEL_MESSAGES_FILTER_EMPTY) result += u32_b(@pts) result += u32_b(@limit) result end |