protected void Page_Load(object sender, EventArgs e)
    {
        string apikKey    = "";
        string secretKey  = "";
        string channel_id = "3768035906403034373";

        Push_Single_Device_Mod psdm = new Push_Single_Device_Mod(apikKey, channel_id, "{\"title\":\"胶圈体育总局通知:\",\"description\":\"老荣膝盖酸痛退役!\"}");
        Push_Single_Device     psd  = new Push_Single_Device(secretKey, psdm);
        string result = psd.PushMessage();

        Response.Write(result);
    }
示例#2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string apikKey    = PubSql.ApiKey;
            string secretKey  = PubSql.SecretKey;
            string channel_id = PubSql.ChannelId;


            Push_Single_Device_Mod psdm = new Push_Single_Device_Mod(apikKey, channel_id, "{\"title\":\"胶圈体育总局通知:\",\"description\":\"老荣膝盖酸痛退役!\"}", 1);
            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 = "";

        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 btn_Send_Click(object sender, EventArgs e)
        {
            string apikKey    = PubSql.ApiKey;
            string secretKey  = PubSql.SecretKey;
            string channel_id = PubSql.ChannelId;

            Notice_Android_Mod     dam  = new Notice_Android_Mod(txtTitle.Value, txtContent.Value);
            string                 json = JsonConvert.SerializeObject(dam);
            Push_Single_Device_Mod psdm = new Push_Single_Device_Mod(apikKey, channel_id, json, (int)Baidu_Helper.Message_Type.Notice, 1);

            Push_Single_Device psd = new Push_Single_Device(secretKey, psdm);

            txtResponse.Value = psd.PushMessage();
        }