Beispiel #1
0
        public void TestMethod1()
        {
            LonoNetClient client = new LonoNetClient(_clientId, _clientSecret, _authToken, _deviceId);
            var login = client.GetAccessToken(_authCode);

            ZoneState zs = client.GetActiveZone();
            ZoneInfo zi = client.GetAllZones();
            DeviceInfo di = client.GetDeviceInfo();
            client.SetZone(1, true);
            Thread.Sleep(10);
            client.SetZone(1, false);
        }
Beispiel #2
0
        public void TestMethod2()
        {
            LonoNetClient client = new LonoNetClient(_clientId, _clientSecret, _deviceId);
            string url = client.BuildAuthorizationUrl("http://localhost", "write");
            // Launch url
            // set _authCode to value returned in url
            var login = client.GetAccessToken(_authCode);

            ZoneState zs = client.GetActiveZone();
            ZoneInfo zi = client.GetAllZones();
            DeviceInfo di = client.GetDeviceInfo();
            client.SetZone(1, true);
            Thread.Sleep(10);
            client.SetZone(1, false);
        }