Example #1
0
        private ReceivedResult getReceiveds_common(string msg_ids, string path)
        {
            ResponseWrapper responseWrapper             = this.sendGet("https://report.jpush.cn" + path + "?msg_ids=" + msg_ids, Base64.getBase64Encode(this.appKey + ":" + this.masterSecret), (string)null);
            ReceivedResult  receivedResult              = new ReceivedResult();
            List <ReceivedResult.Received> receivedList = new List <ReceivedResult.Received>();

            if (responseWrapper.responseCode == HttpStatusCode.OK)
            {
                receivedList = (List <ReceivedResult.Received>)JsonTool.JsonToObject(responseWrapper.responseContent, (object)receivedList);
                string responseContent = responseWrapper.responseContent;
            }
            receivedResult.ResponseResult = responseWrapper;
            receivedResult.ReceivedList   = receivedList;
            return(receivedResult);
        }
Example #2
0
        private ReceivedResult getReceiveds_common(String msg_ids, string path)
        {
            String          url    = REPORT_HOST_NAME + path + "?msg_ids=" + msg_ids;
            String          auth   = Base64.getBase64Encode(this.appKey + ":" + this.masterSecret);
            ResponseWrapper rsp    = this.sendGet(url, auth, null);
            ReceivedResult  result = new ReceivedResult();
            List <ReceivedResult.Received> list = new List <ReceivedResult.Received>();

            Console.WriteLine("recieve content==" + rsp.responseContent);
            if (rsp.responseCode == System.Net.HttpStatusCode.OK)
            {
                list = (List <ReceivedResult.Received>)JsonTool.JsonToObject(rsp.responseContent, list);
                String content = rsp.responseContent;
            }
            result.ResponseResult = rsp;
            result.ReceivedList   = list;
            return(result);
        }
Example #3
0
        public ReceivedResult getReceiveds(String msg_ids)
        {
            String         url    = REPORT_HOST_NAME + REPORT_RECEIVE_PATH + "?msg_ids=" + msg_ids;
            String         auth   = Base64.getBase64Encode(this.appKey + ":" + this.masterSecret);
            ResponseResult rsp    = this.sendGet(url, auth, null);
            ReceivedResult result = new ReceivedResult();
            List <ReceivedResult.Received> list = new List <ReceivedResult.Received>();

            //Console.WriteLine("recie content=="+rsp.responseContent);
            if (rsp.responseCode == System.Net.HttpStatusCode.OK)
            {
                //Console.WriteLine("responseContent===" + result.responseContent);
                list = (List <ReceivedResult.Received>)JsonTool.JsonToObject(rsp.responseContent, list);
                //Console.WriteLine(obj);
                String content = rsp.responseContent;
            }
            result.ResponseResult = rsp;
            result.ReceivedList   = list;
            return(result);
        }
        public ReceivedResult getReceiveds(String msg_ids)
        {
            String url = REPORT_HOST_NAME + REPORT_RECEIVE_PATH + "?msg_ids=" + msg_ids;
            String auth = Base64.getBase64Encode(this.appKey+":"+this.masterSecret);
            ResponseResult rsp = this.sendGet(url, auth, null);
            ReceivedResult result = new ReceivedResult();
            List<ReceivedResult.Received> list = new List<ReceivedResult.Received>();

            //Console.WriteLine("recie content=="+rsp.responseContent);
            if (rsp.responseCode == System.Net.HttpStatusCode.OK)
            {
                //Console.WriteLine("responseContent===" + result.responseContent);
                list = (List<ReceivedResult.Received>)JsonTool.JsonToObject(rsp.responseContent,list);
                //Console.WriteLine(obj);
                String content = rsp.responseContent;
            }
            result.ResponseResult = rsp;
            result.ReceivedList = list;
            return result;
        }
        private ReceivedResult getReceiveds_common(String msg_ids, string path)
        {
            String url = REPORT_HOST_NAME + path + "?msg_ids=" + msg_ids;
            String auth = Base64.getBase64Encode(this.appKey + ":" + this.masterSecret);
            ResponseWrapper rsp = this.sendGet(url, auth, null);
            ReceivedResult result = new ReceivedResult();
            List<ReceivedResult.Received> list = new List<ReceivedResult.Received>();

            Console.WriteLine("recieve content==" + rsp.responseContent);
            if (rsp.responseCode == System.Net.HttpStatusCode.OK)
            {
                list = (List<ReceivedResult.Received>)JsonTool.JsonToObject(rsp.responseContent, list);
                String content = rsp.responseContent;
            }
            result.ResponseResult = rsp;
            result.ReceivedList = list;
            return result;
        }