Search in sources :

Example 1 with UserListBean

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

the class FriendListDao method getGSONMsgList.

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

Example 2 with UserListBean

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

the class FanUserLoader method loadData.

public UserListBean loadData() throws WeiboException {
    FanListDao dao = new FanListDao(token, uid);
    dao.setCursor(cursor);
    UserListBean result = null;
    lock.lock();
    try {
        result = dao.getGSONMsgList();
    } finally {
        lock.unlock();
    }
    return result;
}
Also used : FanListDao(org.qii.weiciyuan.dao.user.FanListDao) UserListBean(org.qii.weiciyuan.bean.UserListBean)

Example 3 with UserListBean

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

the class FriendUserLoader method loadData.

public UserListBean loadData() throws WeiboException {
    FriendListDao dao = new FriendListDao(token, uid);
    dao.setCursor(cursor);
    UserListBean result = null;
    lock.lock();
    try {
        result = dao.getGSONMsgList();
    } finally {
        lock.unlock();
    }
    return result;
}
Also used : FriendListDao(org.qii.weiciyuan.dao.user.FriendListDao) UserListBean(org.qii.weiciyuan.bean.UserListBean)

Example 4 with UserListBean

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

the class SearchUserLoader method loadData.

public UserListBean loadData() throws WeiboException {
    SearchDao dao = new SearchDao(token, searchWord);
    dao.setPage(page);
    UserListBean result = null;
    lock.lock();
    try {
        result = dao.getUserList();
    } finally {
        lock.unlock();
    }
    return result;
}
Also used : SearchDao(org.qii.weiciyuan.dao.search.SearchDao) UserListBean(org.qii.weiciyuan.bean.UserListBean)

Example 5 with UserListBean

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

the class FanListDao method getGSONMsgList.

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

Aggregations

UserListBean (org.qii.weiciyuan.bean.UserListBean)6 Gson (com.google.gson.Gson)3 JsonSyntaxException (com.google.gson.JsonSyntaxException)3 HashMap (java.util.HashMap)3 SearchDao (org.qii.weiciyuan.dao.search.SearchDao)1 FanListDao (org.qii.weiciyuan.dao.user.FanListDao)1 FriendListDao (org.qii.weiciyuan.dao.user.FriendListDao)1