Class: MaxBotApi::Resources::Bots
- Inherits:
-
Object
- Object
- MaxBotApi::Resources::Bots
- Defined in:
- lib/max_bot_api/resources/bots.rb
Overview
Bots API methods.
Instance Method Summary collapse
-
#get_bot ⇒ Object
Get current bot info.
-
#initialize(client) ⇒ Bots
constructor
A new instance of Bots.
-
#patch_bot(patch) ⇒ Object
Patch current bot info.
Constructor Details
#initialize(client) ⇒ Bots
Returns a new instance of Bots.
7 8 9 |
# File 'lib/max_bot_api/resources/bots.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#get_bot ⇒ Object
Get current bot info.
12 13 14 |
# File 'lib/max_bot_api/resources/bots.rb', line 12 def get_bot @client.request(:get, 'me') end |
#patch_bot(patch) ⇒ Object
Patch current bot info.
18 19 20 |
# File 'lib/max_bot_api/resources/bots.rb', line 18 def patch_bot(patch) @client.request(:patch, 'me', body: patch) end |