private MessagesResult getReportMessages(String msgIds) { String checkMsgId = checkMsgids(msgIds); String url = REPORT_HOST_NAME + REPORT_RECEIVE_PATH + "?msg_ids=" + checkMsgId; String auth = Base64.getBase64Encode(this.appKey + ":" + this.masterSecret); ResponseWrapper response = this.sendGet(url, auth, null); return(MessagesResult.fromResponse(response)); }
public static MessagesResult fromResponse(ResponseWrapper responseWrapper) { MessagesResult receivedsResult = new MessagesResult(); if (responseWrapper.responseCode==HttpStatusCode.OK) { receivedsResult.messages = JsonConvert.DeserializeObject<List<Message>>(responseWrapper.responseContent); } receivedsResult.ResponseResult = responseWrapper; return receivedsResult; }
public static MessagesResult fromResponse(ResponseWrapper responseWrapper) { MessagesResult messagesResult = new MessagesResult(); if (responseWrapper.responseCode == HttpStatusCode.OK) { messagesResult.messages = (List <MessagesResult.Message>)JsonConvert.DeserializeObject <List <MessagesResult.Message> >(responseWrapper.responseContent); } messagesResult.ResponseResult = responseWrapper; return(messagesResult); }
public static MessagesResult fromResponse(ResponseWrapper responseWrapper) { MessagesResult receivedsResult = new MessagesResult(); if (responseWrapper.responseCode==HttpStatusCode.OK) { receivedsResult.messages = JsonConvert.DeserializeObject<List<Message>>(responseWrapper.responseContent); //[{"android":{"received":null,"target":null,"online_push":null,"click":null,"msg_click":null},"ios":{"apns_sent":1,"apns_target":1,"click":null,"target":null,"received":null,"msg_click":null},"winphone":{"mpns_target":null,"mpns_sent":null,"click":null},"msg_id":991969761}] } receivedsResult.ResponseResult = responseWrapper; return receivedsResult; }
public static MessagesResult fromResponse(ResponseWrapper responseWrapper) { MessagesResult receivedsResult = new MessagesResult(); if (responseWrapper.responseCode == HttpStatusCode.OK) { receivedsResult.messages = JsonConvert.DeserializeObject <List <Message> >(responseWrapper.responseContent); //[{"android":{"received":null,"target":null,"online_push":null,"click":null,"msg_click":null},"ios":{"apns_sent":1,"apns_target":1,"click":null,"target":null,"received":null,"msg_click":null},"winphone":{"mpns_target":null,"mpns_sent":null,"click":null},"msg_id":991969761}] } receivedsResult.ResponseResult = responseWrapper; return(receivedsResult); }
private MessagesResult getReportMessages(string msgIds) { ResponseWrapper responseWrapper = this.sendGet("https://report.jpush.cn/v3/messages?msg_ids=" + this.checkMsgids(msgIds), Base64.getBase64Encode(this.appKey + ":" + this.masterSecret), (string)null); MessagesResult messagesResult = new MessagesResult(); List <MessagesResult.Message> messageList = new List <MessagesResult.Message>(); Console.WriteLine("recieve content==" + responseWrapper.responseContent); if (responseWrapper.responseCode == HttpStatusCode.OK) { messageList = (List <MessagesResult.Message>)JsonTool.JsonToObject(responseWrapper.responseContent, (object)messageList); string responseContent = responseWrapper.responseContent; } messagesResult.ResponseResult = responseWrapper; messagesResult.messages = messageList; return(messagesResult); }
private MessagesResult getReportMessages(String msgIds) { String checkMsgId = checkMsgids(msgIds); String url = REPORT_HOST_NAME + REPORT_MESSAGE_PATH_V3 + "?msg_ids=" + checkMsgId; String auth = Base64.getBase64Encode(this.appKey + ":" + this.masterSecret); ResponseWrapper rsp = this.sendGet(url, auth, null); MessagesResult result = new MessagesResult(); List <MessagesResult.Message> list = new List <MessagesResult.Message>(); Console.WriteLine("recieve content==" + rsp.responseContent); if (rsp.responseCode == System.Net.HttpStatusCode.OK) { list = (List <MessagesResult.Message>)JsonTool.JsonToObject(rsp.responseContent, list); String content = rsp.responseContent; } result.ResponseResult = rsp; result.messages = list; return(result); }
private MessagesResult getReportMessages(String msgIds) { String checkMsgId = checkMsgids(msgIds); String url = REPORT_HOST_NAME + REPORT_MESSAGE_PATH_V3 + "?msg_ids=" + checkMsgId; String auth = Base64.getBase64Encode(this.appKey + ":" + this.masterSecret); ResponseWrapper rsp = this.sendGet(url, auth, null); MessagesResult result = new MessagesResult(); List<MessagesResult.Message> list = new List<MessagesResult.Message>(); Console.WriteLine("recieve content==" + rsp.responseContent); if (rsp.responseCode == System.Net.HttpStatusCode.OK) { list = (List<MessagesResult.Message>)JsonTool.JsonToObject(rsp.responseContent, list); String content = rsp.responseContent; } result.ResponseResult = rsp; result.messages = list; return result; }