コード例 #1
0
 def setUp(self):
     logging.debug('hi')
     #RSA Auth flow:
     configure = SymConfig('sym_api_client_python/resources/rsa_config.json')
     configure.loadFromRSA()
     auth = SymBotRSAAuth(configure)
     auth.authenticate()
     #initialize SymBotClient with auth and configure objects
     self.botClient = SymBotClient(auth, configure)
コード例 #2
0
 def setUp(self):
     #go thorugh auth and config and then call function on message client
     logging.debug('hi')
     #RSA Auth flow:
     configure = SymConfig(
         'sym_api_client_python/resources/rsa_config.json')
     configure.loadFromRSA()
     auth = SymBotRSAAuth(configure)
     auth.authenticate()
     #initialize SymBotClient with auth and configure objects
     self.botClient = SymBotClient(auth, configure)
     self.streamId = 'GVYRWwxRnEI7xde31EQz63___prrBEtgdA'
コード例 #3
0
def main():
        print('hi')
        #RSA Auth flow: pass path to rsa_config.json file
        configure = SymConfig('sym_api_client_python/resources/rsa_config.json')
        configure.loadFromRSA()
        auth = SymBotRSAAuth(configure)
        auth.authenticate()
        #initialize SymBotClient with auth and configure objects
        botClient = SymBotClient(auth, configure)
        #initialize datafeed service
        DataFeedEventService = botClient.getDataFeedEventService()
        #initialize listener classes and append them to DataFeedEventService class
        #these listener classes sit in DataFeedEventService class as a way to easily handle events
        #coming back from the DataFeed
        imListenerTest = IMListenerTestImp(botClient)
        DataFeedEventService.addIMListener(imListenerTest)
        roomListenerTest = RoomListenerTestImp(botClient)
        DataFeedEventService.addRoomListener(roomListenerTest)
        #create data feed and read datafeed recursively
        print('starting datafeed')
        DataFeedEventService.startDataFeed()