Class: Botomizer::Telegram::Webhook
- Inherits:
-
Object
- Object
- Botomizer::Telegram::Webhook
- Defined in:
- lib/botomizer/telegram/webhook.rb
Instance Method Summary collapse
- #delete ⇒ Object
- #delete! ⇒ Object
- #info ⇒ Object
-
#initialize(client) ⇒ Webhook
constructor
A new instance of Webhook.
- #set(url) ⇒ Object
- #set!(url) ⇒ Object
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
#delete ⇒ Object
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 |
#info ⇒ Object
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 |