Exemplo n.º 1
0
        public static void SendAction(string domain, string action, Dictionary<string, string> data)
        {
            string json = "{" + ParseDictionaryToJson(data) + "}";

            WebRequests.SendData(domain, action, json);
        }
Exemplo n.º 2
0
        public static void SendAction(string entityId, string action)
        {
            string json = "{\"entity_id\":\"" + entityId + "\"}";

            WebRequests.SendData(entityId.Split('.')[0], action, json);
        }
Exemplo n.º 3
0
        public static void SendAction(string action, IEnumerable<string> entityIds)
        {
            string json = "{\"entity_id\":[" + string.Join(',', entityIds.Select(x => "\"" + x + "\"").ToList()) + "]}";

            WebRequests.SendData(entityIds.First().Split('.')[0], action, json);
        }
Exemplo n.º 4
0
 public static void SendActionNoData(string entityId)
 {
     WebRequests.SendData(entityId.Split('.')[0], entityId.Split('.')[1], string.Empty);
 }