Class: Telegrambot::Client
- Inherits:
-
Object
- Object
- Telegrambot::Client
- Defined in:
- lib/telegrambot/client.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
Instance Method Summary collapse
-
#initialize(token) ⇒ Client
constructor
A new instance of Client.
-
#listen_webhook(data) ⇒ Telegrambot::Types::Update
Escucha Webhooks.
Constructor Details
#initialize(token) ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/telegrambot/client.rb', line 5 def initialize(token) @api = Api.new(token) end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
3 4 5 |
# File 'lib/telegrambot/client.rb', line 3 def api @api end |
Instance Method Details
#listen_webhook(data) ⇒ Telegrambot::Types::Update
Escucha Webhooks
12 13 14 |
# File 'lib/telegrambot/client.rb', line 12 def listen_webhook(data) update = Telegrambot::Types::Update.new(data) end |