from .base import Base
[docs]class Bots(Base):
endpoint = '/bots'
[docs] def create_bot(self, options):
return self.client.post(
self.endpoint,
options=options
)
[docs] def get_bots(self, params=None):
return self.client.get(
self.endpoint,
params=params
)
[docs] def patch_bot(self, bot_id, options):
return self.client.put(
self.endpoint + '/' + bot_id,
options=options
)
[docs] def get_bot(self, bot_id, params=None):
return self.client.get(
self.endpoint + '/' + bot_id,
params=params
)
[docs] def disable_bot(self, bot_id):
return self.client.post(
self.endpoint + '/' + bot_id + '/disable'
)
[docs] def enable_bot(self, bot_id):
return self.client.post(
self.endpoint + '/' + bot_id + '/enable'
)
[docs] def assign_bot_to_user(self, bot_id, user_id):
return self.client.post(
self.endpoint + '/' + bot_id + '/assign/' + user_id
)
[docs] def get_bot_lhs_icon(self, bot_id):
return self.client.get(
self.endpoint + '/' + bot_id + '/icon'
)
[docs] def set_bot_lhs_icon(self, bot_id, files):
return self.client.post(
self.endpoint + '/' + bot_id + '/icon',
files=files
)
[docs] def delete_bot_lhs_icon(self, bot_id):
return self.client.delete(
self.endpoint + '/' + bot_id + '/icon'
)