Beispiel #1
0
        public async Task <Room> FetchRoomInfoAsync()
        {
            var room = await BililiveApi.GetRoomInfoAsync(RoomId);

            RoomInfoUpdated?.Invoke(this, new RoomInfoUpdatedArgs {
                Room = room
            });
            return(room);
        }
        public async Task GetRoomInfoTest()
        {
            const int roomId = 3;
            var       room   = await BililiveApi.GetRoomInfoAsync(roomId);

            Assert.IsTrue(room.IsStreaming);
            Assert.AreEqual(room.RoomId, 23058);
            Assert.AreEqual(room.ShortRoomId, 3);
            Assert.AreEqual(room.UserName, @"3号直播间");
            Console.WriteLine(room.Title);
        }