Ejemplo n.º 1
0
 private UmengData GetPushData(string tiker, string title, string text, Dictionary<string, object> objs)
 {
     UmengData data = new UmengData();
     data.payload.SetTicker(tiker);
     data.payload.SetTitle(title);
     data.payload.SetText(text);
     data.extra = objs;
     return data;
 }
Ejemplo n.º 2
0
        private bool Push(string url, UmengData data)
        {
            string body = data.ToJsonString();
            var sign = GetSign(url, body);

            var pushUrl = string.Format("{0}?sign={1}", url, sign);

            WebClient client = new WebClient();
            var rep = client.UploadString(pushUrl, body);
            _logger.Info(rep);
            return true;
        }