def make_weather_call(self): input = EyePiInput() input.deviceToken = self.__devicetoken input.token = self.__token actions = dict() actions[ActionEnum.WEATHER] = self.__person.autorisations[ActionEnum.WEATHER].module_config input.action = actions output = ConnectEyePi().handleRequest(input) print(output) print(self.__unpickle_action(output.data, ActionEnum.WEATHER)) if output.ok: self.__token = output.token
def make_phone_call(self): config = self.__unpickle(self.__person.autorisations[ActionEnum.PHONE].module_config) phone_input = GetStatus() phone_input.email = config.email input = EyePiInput() input.deviceToken = self.__devicetoken input.token = self.__token actions = dict() actions[ActionEnum.PHONE] = self.__pickle(phone_input) input.action = actions output = ConnectEyePi().handleRequest(input) print(output) print(self.__unpickle_action(output.data, ActionEnum.PHONE)) if output.ok: self.__token = output.token
def make_agenda_call(self): config = self.__unpickle(self.__person.autorisations[ActionEnum.AGENDA].module_config) agenda_input = GetItemsActionInput() agenda_input.email = config.email input = EyePiInput() input.deviceToken = self.__devicetoken input.token = self.__token actions = dict() actions[ActionEnum.AGENDA] = self.__pickle(agenda_input) input.action = actions output = ConnectEyePi().handleRequest(input) print(output) print(self.__unpickle_action(output.data, ActionEnum.AGENDA)) if output.ok: print("output = ok") self.__token = output.token