use of org.qii.weiciyuan.bean.CommentListBean in project weiciyuan by qii.
the class MainCommentsTimeLineDao method getGSONMsgListWithoutClearUnread.
public CommentListBean getGSONMsgListWithoutClearUnread() throws WeiboException {
String url = getUrl();
Map<String, String> map = new HashMap<String, String>();
map.put("access_token", access_token);
map.put("since_id", since_id);
map.put("max_id", max_id);
map.put("count", count);
map.put("page", page);
map.put("filter_by_author", filter_by_author);
map.put("filter_by_source", filter_by_source);
String jsonData = HttpUtility.getInstance().executeNormalTask(HttpMethod.Get, url, map);
Gson gson = new Gson();
CommentListBean value = null;
try {
value = gson.fromJson(jsonData, CommentListBean.class);
} catch (JsonSyntaxException e) {
AppLogger.e(e.getMessage());
}
if (value != null && value.getSize() > 0) {
List<CommentBean> msgList = value.getItemList();
Iterator<CommentBean> iterator = msgList.iterator();
while (iterator.hasNext()) {
CommentBean msg = iterator.next();
if (msg.getUser() == null) {
iterator.remove();
} else {
msg.getListViewSpannableString();
TimeUtility.dealMills(msg);
}
}
}
return value;
}
use of org.qii.weiciyuan.bean.CommentListBean in project weiciyuan by qii.
the class CommentsTimeLineByIdDao method getGSONMsgList.
public CommentListBean getGSONMsgList() throws WeiboException {
String url = URLHelper.COMMENTS_TIMELINE_BY_MSGID;
Map<String, String> map = new HashMap<String, String>();
map.put("access_token", access_token);
map.put("id", id);
map.put("since_id", since_id);
map.put("max_id", max_id);
map.put("count", count);
map.put("page", page);
map.put("filter_by_author", filter_by_author);
String jsonData = HttpUtility.getInstance().executeNormalTask(HttpMethod.Get, url, map);
Gson gson = new Gson();
CommentListBean value = null;
try {
value = gson.fromJson(jsonData, CommentListBean.class);
} catch (JsonSyntaxException e) {
AppLogger.e(e.getMessage());
}
if (value != null && value.getItemList().size() > 0) {
List<CommentBean> msgList = value.getItemList();
Iterator<CommentBean> iterator = msgList.iterator();
while (iterator.hasNext()) {
CommentBean msg = iterator.next();
if (msg.getUser() == null) {
iterator.remove();
} else {
msg.getListViewSpannableString();
TimeUtility.dealMills(msg);
}
}
}
return value;
}
Aggregations