Source code for mattermostdriver.endpoints.roles

from .base import Base


[docs]class Roles(Base): endpoint = '/roles'
[docs] def get_role_by_id(self, role_id): return self.client.get( self.endpoint + '/' + role_id )
[docs] def get_role_by_name(self, role_name): return self.client.get( self.endpoint + '/name/' + role_name )
[docs] def patch_role(self, role_id, options=None): return self.client.put( self.endpoint + '/' + role_id + '/patch', options=options )
[docs] def get_list_of_roles_by_name(self): return self.client.get( self.endpoint + '/names', )