예제 #1
0
        static void Main(string[] args)
        {
            string                filePath              = Path.GetFullPath("config.json");
            SymBotClient          symBotClient          = new SymBotClient();
            DatafeedEventsService datafeedEventsService = new DatafeedEventsService();
            SymConfig             symConfig             = symBotClient.initBot(filePath);
            RoomListener          botLogic              = new BotLogic();
            DatafeedClient        datafeedClient        = datafeedEventsService.init(symConfig);
            Datafeed              datafeed              = datafeedEventsService.createDatafeed(symConfig, datafeedClient);

            datafeedEventsService.addRoomListener(botLogic);
            datafeedEventsService.getEventsFromDatafeed(symConfig, datafeed, datafeedClient);
        }
예제 #2
0
        static void Main(string[] args)
        {
            SymConfig     symConfig = new SymConfigLoader().loadFromFile("config.json");
            SymBotRSAAuth botAuth   = new SymBotRSAAuth(symConfig);

            botAuth.authenticate();
            SymBotClient botClient = SymBotClient.initBot(symConfig, botAuth);

            // start listening for messages
            DatafeedEventsService dataFeedService = botClient.getDatafeedEventsService();
            BotLogic listener = new BotLogic(botClient);

            dataFeedService.addIMListener(listener);
            dataFeedService.getEventsFromDatafeed();
        }