Пример #1
0
        public static void SendAction(string domain, string action, Dictionary<string, string> data)
        {
            string json = "{" + ParseDictionaryToJson(data) + "}";

            WebRequests.SendData(domain, action, json);
        }
Пример #2
0
        public static void SendAction(string entityId, string action)
        {
            string json = "{\"entity_id\":\"" + entityId + "\"}";

            WebRequests.SendData(entityId.Split('.')[0], action, json);
        }
Пример #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);
        }
Пример #4
0
 public static void SendActionNoData(string entityId)
 {
     WebRequests.SendData(entityId.Split('.')[0], entityId.Split('.')[1], string.Empty);
 }