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; }
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; }