use of org.qii.weiciyuan.bean.RepostListBean in project weiciyuan by qii.
the class RepostsTimeLineByIdDao method getGSONMsgList.
public RepostListBean getGSONMsgList() throws WeiboException {
String url = URLHelper.REPOSTS_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();
RepostListBean value = null;
try {
value = gson.fromJson(jsonData, RepostListBean.class);
} catch (JsonSyntaxException e) {
AppLogger.e(e.getMessage());
}
if (value != null && value.getItemList().size() > 0) {
List<MessageBean> msgList = value.getItemList();
Iterator<MessageBean> iterator = msgList.iterator();
while (iterator.hasNext()) {
MessageBean msg = iterator.next();
if (msg.getUser() == null) {
iterator.remove();
} else {
msg.getListViewSpannableString();
TimeUtility.dealMills(msg);
}
}
}
return value;
}
use of org.qii.weiciyuan.bean.RepostListBean in project weiciyuan by qii.
the class RepostByIdMsgLoader method loadData.
public RepostListBean loadData() throws WeiboException {
RepostsTimeLineByIdDao dao = new RepostsTimeLineByIdDao(token, id);
dao.setSince_id(sinceId);
dao.setMax_id(maxId);
RepostListBean result = null;
lock.lock();
try {
result = dao.getGSONMsgList();
} finally {
lock.unlock();
}
return result;
}
Aggregations