Class: MTProto::RPC::GetConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/mtproto/rpc/get_config.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ GetConfig

Returns a new instance of GetConfig.



9
10
11
# File 'lib/mtproto/rpc/get_config.rb', line 9

def initialize(client)
  @client = client
end

Instance Method Details

#callObject



13
14
15
16
17
# File 'lib/mtproto/rpc/get_config.rb', line 13

def call
  query = build_query

  @client.rpc.call(query)
end

#call_syncObject



19
20
21
22
23
24
25
# File 'lib/mtproto/rpc/get_config.rb', line 19

def call_sync
  query = build_query

  response = @client.rpc.call_sync(query)

  Type::RPC::Help::Config.parse(response)
end