示例#1
0
 def list_roles(self):
     url = "roles"
     roles = []
     for r in self._api._get(url):
         roles.append(Role(**r))
     return roles
示例#2
0
 def get_role(self, role_id):
     url = "roles/%s" % role_id
     return Role(**self._api._get(url))
示例#3
0
 def get_role(self, role_id):
     url = 'roles/%s' % role_id
     return Role(**self._api._get(url)['roles'])