Class: Botomizer::Telegram::Webhook

Inherits:
Object
  • Object
show all
Defined in:
lib/botomizer/telegram/webhook.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Webhook

Returns a new instance of Webhook.



2
3
4
# File 'lib/botomizer/telegram/webhook.rb', line 2

def initialize(client)
  @client = client
end

Instance Method Details

#deleteObject



18
19
20
# File 'lib/botomizer/telegram/webhook.rb', line 18

def delete
  @client.send('deleteWebhook')
end

#delete!Object



22
23
24
# File 'lib/botomizer/telegram/webhook.rb', line 22

def delete!
  @client.send!('deleteWebhook')
end

#infoObject



14
15
16
# File 'lib/botomizer/telegram/webhook.rb', line 14

def info
  @client.send('getWebhookInfo')
end

#set(url) ⇒ Object



6
7
8
# File 'lib/botomizer/telegram/webhook.rb', line 6

def set(url)
  @client.send('setWebhook', {url: url})
end

#set!(url) ⇒ Object



10
11
12
# File 'lib/botomizer/telegram/webhook.rb', line 10

def set!(url)
  @client.send!('setWebhook', {url: url})
end