コード例 #1
0
ファイル: UnitTest.cs プロジェクト: tub5/RingApi
        public async Task GetDoorbotsHistoryRecordingByIdTest()
        {
            if (!IsSessionActive())
            {
                return;
            }

            var doorbotHistory = await session.GetDoorbotsHistory();

            Assert.IsTrue(doorbotHistory.Count > 0, "No doorbot history events were found");

            var tempFilePath = Path.GetTempFileName();

            await session.GetDoorbotHistoryRecording(doorbotHistory[0].Id, tempFilePath);

            File.Delete(tempFilePath);
        }
コード例 #2
0
        public async Task GetDoorbotsHistoryRecordingByInstanceTest()
        {
            var session = new Api.Session(Username, Password);
            await session.Authenticate();

            var doorbotHistory = await session.GetDoorbotsHistory();

            Assert.IsTrue(doorbotHistory.Count > 0, "No doorbot history events were found");

            var tempFilePath = Path.GetTempFileName();

            await session.GetDoorbotHistoryRecording(doorbotHistory[0], tempFilePath);

            File.Delete(tempFilePath);
        }