def search(self, query): postUri = "/_search" __data__ = None from netbluemind.directory.api.DirEntryQuery import DirEntryQuery from netbluemind.directory.api.DirEntryQuery import __DirEntryQuerySerDer__ __data__ = __DirEntryQuerySerDer__().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': IDirectory_VERSION }, data=json.dumps(__data__)) from netbluemind.directory.api.DirEntry import DirEntry from netbluemind.directory.api.DirEntry import __DirEntrySerDer__ from netbluemind.core.container.model.ItemValue import ItemValue from netbluemind.core.container.model.ItemValue import __ItemValueSerDer__ from netbluemind.core.api.ListResult import ListResult from netbluemind.core.api.ListResult import __ListResultSerDer__ return self.handleResult__( __ListResultSerDer__(__ItemValueSerDer__(__DirEntrySerDer__())), response)
def byContentUri (self, uri ): postUri = "/by_uri"; __data__ = None queryParams = { 'uri': uri }; response = requests.get( self.base + postUri, params = queryParams, verify=False, headers = {'X-BM-ApiKey' : self.apiKey, 'Accept' : 'application/json', 'X-BM-ClientVersion' : IFolders_VERSION}, data = json.dumps(__data__)); from netbluemind.core.api.ListResult import ListResult from netbluemind.core.api.ListResult import __ListResultSerDer__ return self.handleResult__(__ListResultSerDer__(serder.INT), response)
def list (self): postUri = "/_list"; __data__ = None queryParams = { }; response = requests.get( self.base + postUri, params = queryParams, verify=False, headers = {'X-BM-ApiKey' : self.apiKey, 'Accept' : 'application/json', 'X-BM-ClientVersion' : ICalendarView_VERSION}, data = json.dumps(__data__)); from netbluemind.calendar.api.CalendarView import CalendarView from netbluemind.calendar.api.CalendarView import __CalendarViewSerDer__ from netbluemind.core.container.model.ItemValue import ItemValue from netbluemind.core.container.model.ItemValue import __ItemValueSerDer__ from netbluemind.core.api.ListResult import ListResult from netbluemind.core.api.ListResult import __ListResultSerDer__ return self.handleResult__(__ListResultSerDer__(__ItemValueSerDer__(__CalendarViewSerDer__())), response)
def search (self, query ): postUri = "/_search"; __data__ = None from netbluemind.addressbook.api.VCardQuery import VCardQuery from netbluemind.addressbook.api.VCardQuery import __VCardQuerySerDer__ __data__ = __VCardQuerySerDer__().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' : IAddressBook_VERSION}, data = json.dumps(__data__)); from netbluemind.addressbook.api.VCardInfo import VCardInfo from netbluemind.addressbook.api.VCardInfo import __VCardInfoSerDer__ from netbluemind.core.container.model.ItemValue import ItemValue from netbluemind.core.container.model.ItemValue import __ItemValueSerDer__ from netbluemind.core.api.ListResult import ListResult from netbluemind.core.api.ListResult import __ListResultSerDer__ return self.handleResult__(__ListResultSerDer__(__ItemValueSerDer__(__VCardInfoSerDer__())), response)
def list(self): postUri = "" __data__ = None queryParams = {} response = requests.get(self.base + postUri, params=queryParams, verify=False, headers={ 'X-BM-ApiKey': self.apiKey, 'Accept': 'application/json', 'X-BM-ClientVersion': IDocumentFolder_VERSION }, data=json.dumps(__data__)) from netbluemind.documentfolder.api.DocumentFolder import DocumentFolder from netbluemind.documentfolder.api.DocumentFolder import __DocumentFolderSerDer__ from netbluemind.core.api.ListResult import ListResult from netbluemind.core.api.ListResult import __ListResultSerDer__ return self.handleResult__( __ListResultSerDer__(__DocumentFolderSerDer__()), response)
def searchJob(self, query): postUri = "/_searchJob" __data__ = None from netbluemind.scheduledjob.api.JobQuery import JobQuery from netbluemind.scheduledjob.api.JobQuery import __JobQuerySerDer__ __data__ = __JobQuerySerDer__().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': IJob_VERSION }, data=json.dumps(__data__)) from netbluemind.scheduledjob.api.Job import Job from netbluemind.scheduledjob.api.Job import __JobSerDer__ from netbluemind.core.api.ListResult import ListResult from netbluemind.core.api.ListResult import __ListResultSerDer__ return self.handleResult__(__ListResultSerDer__(__JobSerDer__()), response)