Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
        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);
        }