public MeteoPage() { this.InitializeComponent(); netatmoManager = new NetatmoManager(); netatmoManager.LoginSuccessful += ApiLoginSuccessful; netatmoManager.Login(new[] { NetatmoScope.read_station }); }
public SecurityStationTest() { IConfiguration configuration = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json").Build(); string clientId = configuration.GetConnectionString("ClientId"); string clientSecret = configuration.GetConnectionString("ClientSecret"); string netatmoAccount = configuration.GetConnectionString("NetatmoAccount"); string netatmoPassword = configuration.GetConnectionString("NetatmoPassword"); netatmoManager = new NetatmoManager(clientId, clientSecret, netatmoAccount, netatmoPassword); }
public async Task TestGetCameraPicture() { await netatmoManager.LoadSecurityDataAsync(); foreach (Home home in netatmoManager.SecurityStation.Homes) { if (home.Persons != null) { Uri result = NetatmoManager.GetCameraPicture(home.Persons[0].Face.Id, home.Persons[0].Face.Key); Assert.IsNotNull(result, netatmoManager.GetLastError()); return; } else { Assert.IsTrue(false, "No person available for this test."); } } }
public App() { //MainPage = new BibHomeAutomationNavigation.MainPage(); netatmoManager = new NetatmoManager(); //netatmoManager.LoginSuccessful += ApiLoginSuccessful; netatmoManager.Login(new[] { NetatmoScope.read_station, NetatmoScope.read_thermostat }); if (!IsUserLoggedIn) { MainPage = new NavigationPage(new LoginPage()) { BarBackgroundColor = Color.Transparent, BarTextColor = Color.White }; } else { MainPage = new BibHomeAutomationNavigation.MainPage(); } }