コード例 #1
0
 internal static async Task EditCountDownRule(this ICountDown device, string ns, CountDownRule cdr)
 {
     JObject payload = JObject.FromObject(cdr);
     dynamic result  = await((TPLinkSmartDevice)device).Execute(ns, "edit_rule", payload).ConfigureAwait(false);
 }
コード例 #2
0
        internal static async Task <CountDownRule> AddCountDownRule(this ICountDown device, string ns, CountDownRule cdr)
        {
            JObject payload = JObject.FromObject(cdr);
            dynamic result  = await((TPLinkSmartDevice)device).Execute(ns, "add_rule", payload).ConfigureAwait(false);

            cdr.Id = (string)result.id;
            return(cdr);
        }