protected void Page_Load(object sender, EventArgs e) { string apikKey = ""; string secretKey = ""; Notice_Android_Mod dam = new Notice_Android_Mod("交通事故", "王府井大街出现塞车,大家请绕路回家"); string json = JsonConvert.SerializeObject(dam); Push_All_Mod pam = new Push_All_Mod(apikKey, json, (int)Baidu_Helper.Message_Type.Notice); Push_All pa = new Push_All(secretKey, pam); string result = pa.PushMessage(); Response.Write(result); }
protected void Page_Load(object sender, EventArgs e) { string apikKey = ""; string secretKey = ""; Notice_Android_Mod dam = new Notice_Android_Mod("今天天气", "下午北京可能有沙尘暴,大家小心"); string json = JsonConvert.SerializeObject(dam); Push_Single_Device_Mod psdm = new Push_Single_Device_Mod(apikKey, "3768035906403034373", json, (int)Baidu_Helper.Message_Type.Notice); Push_Single_Device psd = new Push_Single_Device(secretKey, psdm); string result = psd.PushMessage(); Response.Write(result); }
protected void Page_Load(object sender, EventArgs e) { string apikKey = ""; string secretKey = ""; string tag = "ball"; Notice_Android_Mod dam = new Notice_Android_Mod("今天股市", "熊市,熊出没人注意!"); string json = JsonConvert.SerializeObject(dam); Push_Tags_Mod ptd = new Push_Tags_Mod(apikKey, tag, json, (int)Baidu_Helper.Message_Type.Notice); Push_Tags pa = new Push_Tags(secretKey, ptd); string result = pa.PushMessage(); Response.Write(result); }