Search in sources :

Example 1 with DMListBean

use of org.qii.weiciyuan.bean.DMListBean in project weiciyuan by qii.

the class DMConversationDao method getConversationList.

public DMListBean getConversationList() throws WeiboException {
    String url = URLHelper.DM_CONVERSATION;
    Map<String, String> map = new HashMap<String, String>();
    map.put("access_token", access_token);
    map.put("uid", uid);
    map.put("page", page);
    map.put("count", count);
    String jsonData = HttpUtility.getInstance().executeNormalTask(HttpMethod.Get, url, map);
    DMListBean value = null;
    try {
        value = new Gson().fromJson(jsonData, DMListBean.class);
    } catch (JsonSyntaxException e) {
        AppLogger.e(e.getMessage());
    }
    return value;
}
Also used : JsonSyntaxException(com.google.gson.JsonSyntaxException) HashMap(java.util.HashMap) DMListBean(org.qii.weiciyuan.bean.DMListBean) Gson(com.google.gson.Gson)

Example 2 with DMListBean

use of org.qii.weiciyuan.bean.DMListBean in project weiciyuan by qii.

the class DMConversationLoader method loadData.

public DMListBean loadData() throws WeiboException {
    DMConversationDao dao = new DMConversationDao(token);
    dao.setPage(Integer.valueOf(page));
    dao.setUid(uid);
    DMListBean result = null;
    lock.lock();
    try {
        result = dao.getConversationList();
    } finally {
        lock.unlock();
    }
    return result;
}
Also used : DMConversationDao(org.qii.weiciyuan.dao.dm.DMConversationDao) DMListBean(org.qii.weiciyuan.bean.DMListBean)

Aggregations

DMListBean (org.qii.weiciyuan.bean.DMListBean)2 Gson (com.google.gson.Gson)1 JsonSyntaxException (com.google.gson.JsonSyntaxException)1 HashMap (java.util.HashMap)1 DMConversationDao (org.qii.weiciyuan.dao.dm.DMConversationDao)1