def search(self, query): postUri = "/_search" __data__ = None from netbluemind.group.api.GroupSearchQuery import GroupSearchQuery from netbluemind.group.api.GroupSearchQuery import __GroupSearchQuerySerDer__ __data__ = __GroupSearchQuerySerDer__().encode(query) queryParams = {} response = requests.post(self.base + postUri, params=queryParams, verify=False, headers={ 'X-BM-ApiKey': self.apiKey, 'Accept': 'application/json', 'X-BM-ClientVersion': IGroup_VERSION }, data=json.dumps(__data__)) from netbluemind.group.api.Group import Group from netbluemind.group.api.Group import __GroupSerDer__ from netbluemind.core.container.model.ItemValue import ItemValue from netbluemind.core.container.model.ItemValue import __ItemValueSerDer__ return self.handleResult__( serder.ListSerDer(__ItemValueSerDer__(__GroupSerDer__())), response)
def update(self, uid, group): postUri = "/{uid}" __data__ = None postUri = postUri.replace("{uid}", uid) from netbluemind.group.api.Group import Group from netbluemind.group.api.Group import __GroupSerDer__ __data__ = __GroupSerDer__().encode(group) queryParams = {} response = requests.post(self.base + postUri, params=queryParams, verify=False, headers={ 'X-BM-ApiKey': self.apiKey, 'Accept': 'application/json', 'X-BM-ClientVersion': IGroup_VERSION }, data=json.dumps(__data__)) return self.handleResult__(None, response)
def byName(self, name): postUri = "/byName/{name}" __data__ = None postUri = postUri.replace("{name}", name) queryParams = {} response = requests.get(self.base + postUri, params=queryParams, verify=False, headers={ 'X-BM-ApiKey': self.apiKey, 'Accept': 'application/json', 'X-BM-ClientVersion': IGroup_VERSION }, data=json.dumps(__data__)) from netbluemind.group.api.Group import Group from netbluemind.group.api.Group import __GroupSerDer__ from netbluemind.core.container.model.ItemValue import ItemValue from netbluemind.core.container.model.ItemValue import __ItemValueSerDer__ return self.handleResult__(__ItemValueSerDer__(__GroupSerDer__()), response)