Exemple #1
0
 def __init__(self, id, argument_parser=None):
     BotClient.__init__(self, id, argument_parser)
     self._api_keys = APIKeysHandler(
         self.configuration.client_configuration)
     self._authorization = None
     self._v1_0_handler = APIHandler_V1_0(self)
     self._v2_0_handler = APIHandler_V2_0(self)
Exemple #2
0
    def __init__(self, argument_parser=None):
        self.clientid = "Voice"
        BotClient.__init__(self, argument_parser)

        if self.configuration.client_configuration.tts_engine_name is None:
            raise Exception("No Text To Speech Engine, exiting...")

        print("Text To Speech: " +
              self.configuration.client_configuration.tts_engine_name)
        if self.configuration.client_configuration.tts_engine_name == 'osx':
            self.tts = OSXSayTextToSpeech(
                self.configuration.client_configuration)
        elif self.configuration.client_configuration.tts_engine_name == 'pyttsx':
            self.tts = OSXSayTextToSpeech(
                self.configuration.client_configuration)
        else:
            raise Exception("Unknown Text To Speech Engine, exiting...")

        if self.configuration.client_configuration.stt_engine_name is None:
            raise Exception("No Speech To Text Engine, exiting...")

        print("Speech To Text: " +
              self.configuration.client_configuration.stt_engine_name)
        if self.configuration.client_configuration.stt_engine_name == 'azhang':
            self.stt = AnthonyZhangSpeechToText(
                self.configuration.client_configuration)
        else:
            raise Exception("Unknown Speech To Text Engine, exiting...")
Exemple #3
0
    def __init__(self, debug=False, level=logging.ERROR):
        if debug is True:
            logging.getLogger().setLevel(level)

        self._file_store_config = FileStorageConfiguration()
        self._storage_engine = FileStorageEngine(self._file_store_config)

        BotClient.__init__(self, "testclient")
    def __init__(self, argument_parser=None):
        BotClient.__init__(self, "viber", argument_parser)

        if logging.getLogger().isEnabledFor(logging.DEBUG):
            logging.debug("Viber Client is running....")

        self._viber_token = self.get_token(self.bot.license_keys)

        self._viber_bot = self.create_viber_bot(self._viber_token)
Exemple #5
0
    def __init__(self, argument_parser=None):
        BotClient.__init__(self, "line", argument_parser)

        self.get_tokens()

        self.create_line_bot()

        if logging.getLogger().isEnabledFor(logging.DEBUG):
            logging.debug("Line Client is running....")
Exemple #6
0
    def __init__(self, argument_parser=None):
        BotClient.__init__(self, 'facebook', argument_parser)

        if logging.getLogger().isEnabledFor(logging.DEBUG):
            logging.debug("Facebook Client is running....")

        self.get_license_keys()

        self._facebook_bot = self.create_facebook_bot()

        print("Facebook Client loaded")
Exemple #7
0
    def __init__(self, argument_parser=None):
        BotClient.__init__(self, 'twilio', argument_parser)

        if logging.getLogger().isEnabledFor(logging.DEBUG):
            logging.debug("Twilio Client is running....")

        self.get_license_keys()

        self._twilio_client = self.create_twilio_client()

        print("Twilio Client loaded")
Exemple #8
0
 def __init__(self, argument_parser=None):
     self.running = True
     BotClient.__init__(self, "Console", argument_parser)
Exemple #9
0
 def __init__(self, argument_parser=None):
     BotClient.__init__(self, argument_parser)
     self.clientid = "Console"
Exemple #10
0
 def __init__(self, argument_parser=None):
     self.clientid = "Twitter"
     BotClient.__init__(self, argument_parser)
Exemple #11
0
 def __init__(self, debug=False, level=logging.ERROR):
     if debug is True:
         logging.getLogger().setLevel(level)
     BotClient.__init__(self, "testclient")
Exemple #12
0
 def __init__(self, argument_parser=None):
     self._username = "******"
     self._username_len = 0
     self._welcome_message = None
     self._api = None
     BotClient.__init__(self, "Twitter", argument_parser)
Exemple #13
0
 def __init__(self):
     BotClient.__init__(self, "WebChat")
Exemple #14
0
 def __init__(self, argument_parser=None):
     BotClient.__init__(self, argument_parser)
Exemple #15
0
 def __init__(self, id, argument_parser=None):
     self._running = False
     BotClient.__init__(self, id, argument_parser=argument_parser)
Exemple #16
0
 def __init__(self, debug=False, level=logging.ERROR):
     if debug is True:
         logging.getLogger().setLevel(level)
     BotClient.__init__(self, "testclient")
Exemple #17
0
 def __init__(self, argument_parser=None):
     self.clientid = "Rest"
     BotClient.__init__(self, argument_parser)
 def __init__(self, id, argument_parser=None):
     BotClient.__init__(self, id, argument_parser)
     self.api_keys = []
     self._status_code = 200
     self._error_msg = ''
Exemple #19
0
 def __init__(self):
     self.clientid = "WebChat"
     BotClient.__init__(self)
Exemple #20
0
 def __init__(self):
     BotClient.__init__(self)
Exemple #21
0
 def __init__(self):
     BotClient.__init__(self, "TestRunner")
Exemple #22
0
 def __init__(self, id, argument_parser=None):
     BotClient.__init__(self, id, argument_parser)
     self.api_keys = []
Exemple #23
0
 def test_client_init(self):
     arguments = MockArgumentParser()
     with self.assertRaises(Exception):
         BotClient("test", arguments)
Exemple #24
0
 def __init__(self):
     BotClient.__init__(self)
     self.clientid = "TestRunner"
Exemple #25
0
 def __init__(self, id, argument_parser=None):
     BotClient.__init__(self, id, argument_parser=argument_parser)
Exemple #26
0
 def __init__(self):
     BotClient.__init__(self, "TestRunner")
Exemple #27
0
 def __init__(self, argument_parser=None):
     BotClient.__init__(self, "Mock", argument_parser)
Exemple #28
0
 def __init__(self, id, argument_parser=None):
     self._running = False
     self._first_time = True
     self._session_saving_mode = False
     BotClient.__init__(self, id, argument_parser=argument_parser)
Exemple #29
0
 def __init__(self, botid, argument_parser=None):
     BotClient.__init__(self, botid, argument_parser=argument_parser)
     self._running = False
Exemple #30
0
 def __init__(self, argument_parser=None):
     self.clientid = "Conversation"
     BotClient.__init__(self, argument_parser)
Exemple #31
0
 def __init__(self, argument_parser=None):
     self._xmpp_client = None
     BotClient.__init__(self, "XMPP", argument_parser)
 def __init__(self, debug=False, level=logging.DEBUG):
     if debug is True:
         logging.getLogger().setLevel(level)
     BotClient.__init__(self)