Class: MaxBotApi::Resources::Bots

Inherits:
Object
  • Object
show all
Defined in:
lib/max_bot_api/resources/bots.rb

Overview

Bots API methods.

Instance Method Summary collapse

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_botObject

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.

Parameters:

  • patch (Hash)


18
19
20
# File 'lib/max_bot_api/resources/bots.rb', line 18

def patch_bot(patch)
  @client.request(:patch, 'me', body: patch)
end