Class: TARS::API

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/tars/api.rb

Class Method Summary collapse

Class Method Details

.meObject



9
10
11
# File 'lib/tars/api.rb', line 9

def self.me
  request 'getMe'
end

.reply_to(chat_id, text) ⇒ Object



21
22
23
# File 'lib/tars/api.rb', line 21

def self.reply_to(chat_id, text)
  request 'sendMessage', chat_id: chat_id, text: text
end

.updatesObject



13
14
15
# File 'lib/tars/api.rb', line 13

def self.updates
  request 'getUpdates'
end

.webhookObject



17
18
19
# File 'lib/tars/api.rb', line 17

def self.webhook
  request 'setWebhook', url: URI(TARS.config.webhook)
end