public void SearchRoom()
        {
            var streamClient    = botClient.getStreamsClient();
            var roomSearchQuery = new RoomSearchQuery
            {
                query     = config.GetSection("test_room_name").Value,
                active    = true,
                isPrivate = true
            };
            var result = streamClient.searchRooms(roomSearchQuery, 0, 0);

            Assert.IsNotNull(result);
            Assert.IsTrue(result.count >= 1);
        }
        public void GetUserIDFromUserNameTest()
        {
            SymConfig       symConfig       = new SymConfig();
            SymConfigLoader symConfigLoader = new SymConfigLoader();

            symConfig = symConfigLoader.loadFromFile("C:/Users/Michael/Documents/Visual Studio 2017/Projects/apiClientDotNet/apiClientDotNetTest/Resources/testConfig.json");
            SymBotAuth botAuth = new SymBotAuth(symConfig);

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

            UserClient userClient = botClient.getUsersClient();
            UserInfo   user       = userClient.getUserFromUsername("mikepreview");

            StreamClient    streamClient    = botClient.getStreamsClient();
            RoomSearchQuery roomSearchQuery = new RoomSearchQuery();

            roomSearchQuery.query     = "APITestRoom";
            roomSearchQuery.active    = true;
            roomSearchQuery.isPrivate = true;
            NumericId id = new NumericId();

            id.id = user.id;
            roomSearchQuery.member = id;
            RoomSearchResult result = streamClient.searchRooms(roomSearchQuery, 0, 0);

            Assert.IsTrue(user != null);
        }
        public void UserListStreams()
        {
            SymConfig       symConfig       = new SymConfig();
            SymConfigLoader symConfigLoader = new SymConfigLoader();

            symConfig = symConfigLoader.loadFromFile("C:/Users/Michael/Documents/Visual Studio 2017/Projects/apiClientDotNet/apiClientDotNetTest/Resources/testConfig.json");
            SymBotAuth botAuth = new SymBotAuth(symConfig);

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

            StreamClient  streamClient = botClient.getStreamsClient();
            List <string> streamTypes  = new List <string>();

            streamTypes.Add("IM");
            streamTypes.Add("ROOM");
            List <StreamListItem> result = streamClient.getUserStreams(streamTypes, false);

            Assert.IsTrue(result != null);
        }
        public void SearchRoom()
        {
            SymConfig       symConfig       = new SymConfig();
            SymConfigLoader symConfigLoader = new SymConfigLoader();

            symConfig = symConfigLoader.loadFromFile("C:/Users/Michael/Documents/Visual Studio 2017/Projects/apiClientDotNet/apiClientDotNetTest/Resources/testConfig.json");
            SymBotAuth botAuth = new SymBotAuth(symConfig);

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

            StreamClient    streamClient    = botClient.getStreamsClient();
            RoomSearchQuery roomSearchQuery = new RoomSearchQuery();

            roomSearchQuery.query     = "APITestRoom";
            roomSearchQuery.active    = true;
            roomSearchQuery.isPrivate = true;
            RoomSearchResult result = streamClient.searchRooms(roomSearchQuery, 0, 0);

            Assert.IsTrue(result != null);
        }