Module: TD::Api

Defined in:
lib/tdlib/api.rb

Defined Under Namespace

Modules: Dl

Class Method Summary collapse

Class Method Details

.client_createObject


7
8
9
# File 'lib/tdlib/api.rb', line 7

def client_create
  Dl.td_json_client_create
end

.client_destroy(client) ⇒ Object


24
25
26
# File 'lib/tdlib/api.rb', line 24

def client_destroy(client)
  Dl.td_json_client_destroy(client)
end

.client_execute(client, params) ⇒ Object


15
16
17
# File 'lib/tdlib/api.rb', line 15

def client_execute(client, params)
  Dl.td_json_client_execute(client, params.to_json)
end

.client_receive(client, timeout) ⇒ Object


19
20
21
22
# File 'lib/tdlib/api.rb', line 19

def client_receive(client, timeout)
  update = Dl.td_json_client_receive(client, timeout)
  update.null? ? nil : JSON.parse(update.to_s)
end

.client_send(client, params) ⇒ Object


11
12
13
# File 'lib/tdlib/api.rb', line 11

def client_send(client, params)
  Dl.td_json_client_send(client, params.to_json)
end

.set_log_file_path(path) ⇒ Object


32
33
34
# File 'lib/tdlib/api.rb', line 32

def set_log_file_path(path)
  Dl.td_set_log_file_path(path)
end

.set_log_verbosity_level(level) ⇒ Object


28
29
30
# File 'lib/tdlib/api.rb', line 28

def set_log_verbosity_level(level)
  Dl.td_set_log_verbosity_level(level)
end