fnetpepAPI.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:FileNetPEAPI 作者: wandss 项目源码 文件源码
def getGroup(self, search_string):
        """Receives a string and looks for it in directory service. If the
        string search isn't found, the message "Group not Found" will be
        returned, otherwise a list with all matching cases, limited to 50
        results will be returned.
        Usage:
        >>> users = pe.getGroup('group_name')
        """        

        groups = []
        group = requests.get(self.client.baseurl+'groups',
                            auth=self.client.cred,
                            params={'searchPattern':search_string,
                                    'searchType':4, 'limit':3000})
        if group.json().get('groups'):
            for grp in group.json()['groups']:
                groups.append(grp['displayName'])
        else:
            return "Group not Found"
        return groups
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号