def search(self, query): postUri = "/_search" __data__ = None from netbluemind.calendar.api.VEventQuery import VEventQuery from netbluemind.calendar.api.VEventQuery import __VEventQuerySerDer__ __data__ = __VEventQuerySerDer__().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': ICalendar_VERSION }, data=json.dumps(__data__)) from netbluemind.calendar.api.VEventSeries import VEventSeries from netbluemind.calendar.api.VEventSeries import __VEventSeriesSerDer__ 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__( __VEventSeriesSerDer__())), response)
def parseInternal(self, value, instance): uidValue = value['uid'] instance.uid = serder.STRING.parse(uidValue) from netbluemind.calendar.api.VEventSeries import VEventSeries from netbluemind.calendar.api.VEventSeries import __VEventSeriesSerDer__ valueValue = value['value'] instance.value = __VEventSeriesSerDer__().parse(valueValue) sendNotificationValue = value['sendNotification'] instance.sendNotification = serder.BOOLEAN.parse(sendNotificationValue) return instance
def encodeInternal(self, value, instance): uidValue = value.uid instance["uid"] = serder.STRING.encode(uidValue) from netbluemind.calendar.api.VEventSeries import VEventSeries from netbluemind.calendar.api.VEventSeries import __VEventSeriesSerDer__ valueValue = value.value instance["value"] = __VEventSeriesSerDer__().encode(valueValue) sendNotificationValue = value.sendNotification instance["sendNotification"] = serder.BOOLEAN.encode( sendNotificationValue) return instance
def getComplete(self, uid): postUri = "/{uid}/complete" __data__ = None postUri = postUri.replace("{uid}", uid) queryParams = {} response = requests.get(self.base + postUri, params=queryParams, verify=False, headers={ 'X-BM-ApiKey': self.apiKey, 'Accept': 'application/json', 'X-BM-ClientVersion': ICalendar_VERSION }, data=json.dumps(__data__)) from netbluemind.calendar.api.VEventSeries import VEventSeries from netbluemind.calendar.api.VEventSeries import __VEventSeriesSerDer__ from netbluemind.core.container.model.ItemValue import ItemValue from netbluemind.core.container.model.ItemValue import __ItemValueSerDer__ return self.handleResult__( __ItemValueSerDer__(__VEventSeriesSerDer__()), response)
def createById(self, id, event, sendNotifications): postUri = "/_byId" __data__ = None from netbluemind.calendar.api.VEventSeries import VEventSeries from netbluemind.calendar.api.VEventSeries import __VEventSeriesSerDer__ __data__ = __VEventSeriesSerDer__().encode(event) queryParams = { 'id': id, 'sendNotifications': sendNotifications } response = requests.put(self.base + postUri, params=queryParams, verify=False, headers={ 'X-BM-ApiKey': self.apiKey, 'Accept': 'application/json', 'X-BM-ClientVersion': ICalendar_VERSION }, data=json.dumps(__data__)) return self.handleResult__(None, response)
def multipleGet(self, uids): postUri = "/_mget" __data__ = None __data__ = serder.ListSerDer(serder.STRING).encode(uids) queryParams = {} response = requests.post(self.base + postUri, params=queryParams, verify=False, headers={ 'X-BM-ApiKey': self.apiKey, 'Accept': 'application/json', 'X-BM-ClientVersion': ICalendar_VERSION }, data=json.dumps(__data__)) from netbluemind.calendar.api.VEventSeries import VEventSeries from netbluemind.calendar.api.VEventSeries import __VEventSeriesSerDer__ from netbluemind.core.container.model.ItemValue import ItemValue from netbluemind.core.container.model.ItemValue import __ItemValueSerDer__ return self.handleResult__( serder.ListSerDer(__ItemValueSerDer__(__VEventSeriesSerDer__())), response)