diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eba3326 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +MyCore/bin +MyCore/obj +.vs diff --git a/MyCore/Services/ArloService.cs b/MyCore/Services/ArloService.cs new file mode 100644 index 0000000..a188b0e --- /dev/null +++ b/MyCore/Services/ArloService.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace MyCore.Services +{ + public class ArloService + { + } +} diff --git a/MyCore/Services/MerossService.cs b/MyCore/Services/MerossService.cs index a2ff293..1f39de6 100644 --- a/MyCore/Services/MerossService.cs +++ b/MyCore/Services/MerossService.cs @@ -69,23 +69,28 @@ namespace MyCore.Services try { + // LOGIN var loginTask = Task.Run(() => PostURI(new Uri(_loginUrl), RequestType.Login)); loginTask.Wait(); if (loginTask.Result != "") { + //RESULT TOKEN var data = ((JObject)JsonConvert.DeserializeObject(loginTask.Result))["data"]; resultToken = JsonConvert.DeserializeObject(data.ToString()); + // GET DEVICE LIST var deviceTask = Task.Run(() => PostURI(new Uri(_devList), RequestType.DeviceList)); deviceTask.Wait(); if (deviceTask.Result != "") { data = ((JObject)JsonConvert.DeserializeObject(deviceTask.Result))["data"]; + // RETRIEVE ALL DEVICES allDevices = JsonConvert.DeserializeObject>(data.ToString()); } + // RETRIEVE LOG var logTask = Task.Run(() => PostURI(new Uri(_logUrl), RequestType.Log)); logTask.Wait();