diff --git a/csharp/SmartThings/Program.cs b/csharp/SmartThings/Program.cs index 7e9a7cb..467bc42 100644 --- a/csharp/SmartThings/Program.cs +++ b/csharp/SmartThings/Program.cs @@ -1,4 +1,4 @@ -using SmartThingsNet.Api; +using SmartThingsNet.Api; using SmartThingsNet.Client; using SmartThingsNet.Model; @@ -16,9 +16,17 @@ namespace SmartThings var rooms = new RoomsApi(configuration); var devicelist = devices.GetDevices(accesstoken).Items; - Console.WriteLine(String.Join(Environment.NewLine, locations.ListLocations(accesstoken).Items.Select(x => x.Name))); - Console.WriteLine(String.Join(Environment.NewLine, rooms.ListRooms(accesstoken, locations.ListLocations(accesstoken).Items.First().LocationId.ToString()).Items.Select(x => x.Name))); - Console.WriteLine(String.Join(Environment.NewLine, devicelist.Select(x => $"{x.Label} :: {x.DeviceId}").ToList())); + Console.WriteLine("Locations:"); + Console.WriteLine("- " + String.Join(Environment.NewLine+"- ", locations.ListLocations(accesstoken).Items.Select(x => x.Name))); + Console.WriteLine(); + + Console.WriteLine("Rooms:"); + Console.WriteLine("- " + String.Join(Environment.NewLine+"- ", rooms.ListRooms(accesstoken, locations.ListLocations(accesstoken).Items.First().LocationId.ToString()).Items.Select(x => x.Name))); + Console.WriteLine(); + + Console.WriteLine("Devices:"); + Console.WriteLine("- " + String.Join(Environment.NewLine+"- ", devicelist.Select(x => $"{x.Label} :: {x.DeviceId}").ToList())); + Console.WriteLine(); } } -} \ No newline at end of file +}