use of org.qii.weiciyuan.bean.SearchStatusListBean in project weiciyuan by qii.
the class SearchDao method getStatusList.
public SearchStatusListBean getStatusList() throws WeiboException {
String url = URLHelper.STATUSES_SEARCH;
Map<String, String> map = new HashMap<String, String>();
map.put("access_token", access_token);
map.put("count", count);
map.put("page", page);
map.put("q", q);
String jsonData = null;
jsonData = HttpUtility.getInstance().executeNormalTask(HttpMethod.Get, url, map);
Gson gson = new Gson();
SearchStatusListBean value = null;
try {
value = gson.fromJson(jsonData, SearchStatusListBean.class);
List<MessageBean> list = value.getItemList();
Iterator<MessageBean> iterator = list.iterator();
while (iterator.hasNext()) {
MessageBean msg = iterator.next();
//message is deleted by sina
if (msg.getUser() == null) {
iterator.remove();
} else {
msg.getListViewSpannableString();
TimeUtility.dealMills(msg);
}
}
} catch (JsonSyntaxException e) {
AppLogger.e(e.getMessage());
}
return value;
}
use of org.qii.weiciyuan.bean.SearchStatusListBean in project weiciyuan by qii.
the class SearchStatusLoader method loadData.
public SearchStatusListBean loadData() throws WeiboException {
SearchDao dao = new SearchDao(token, searchWord);
dao.setPage(page);
SearchStatusListBean result = null;
lock.lock();
try {
result = dao.getStatusList();
} finally {
lock.unlock();
}
return result;
}
Aggregations