Search in sources :

Example 26 with Setting

use of org.aisen.android.common.setting.Setting in project AisenWeiBo by wangdan.

the class SinaSDK method webGetHotTopicsHotStatus.

/**
 * 热门话题的推荐推荐微博列表
 *
 * @param containerId
 * @param sinceId
 * @return
 * @throws TaskException
 */
public StatusContents webGetHotTopicsHotStatus(String containerId, String sinceId) throws TaskException {
    Params params = new Params();
    params.addParameter("containerid", containerId);
    if (!TextUtils.isEmpty(sinceId)) {
        params.addParameter("since_id", sinceId);
    }
    Setting action = newSetting("webGetHotTopicsHotStatus", "container/getIndex", "热门话题热门微博");
    action.getExtras().put(HTTP_UTILITY, newSettingExtra(HTTP_UTILITY, TimelineHotTopicsHttpUtility.class.getName(), ""));
    HttpConfig config = webConfig();
    config.addHeader("Referer", String.format("http://m.weibo.cn/p/index?containerid=%s", containerId));
    try {
        return doGet(config, action, params, StatusContents.class);
    } catch (Exception e) {
        if (e instanceof TaskException)
            checkWebResult((TaskException) e);
        throw e;
    }
}
Also used : TaskException(org.aisen.android.network.task.TaskException) Setting(org.aisen.android.common.setting.Setting) Params(org.aisen.android.network.http.Params) HttpConfig(org.aisen.android.network.http.HttpConfig) ParseException(java.text.ParseException) TaskException(org.aisen.android.network.task.TaskException)

Aggregations

Setting (org.aisen.android.common.setting.Setting)26 Params (org.aisen.android.network.http.Params)17 TaskException (org.aisen.android.network.task.TaskException)11 HttpConfig (org.aisen.android.network.http.HttpConfig)7 ParseException (java.text.ParseException)6 JSONArray (com.alibaba.fastjson.JSONArray)3 JSONObject (com.alibaba.fastjson.JSONObject)3 ArrayList (java.util.ArrayList)2 LikeResultBean (org.aisen.weibo.sina.support.bean.LikeResultBean)2 SpannableString (android.text.SpannableString)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 DefHttpUtility (org.aisen.android.network.http.DefHttpUtility)1 PicUrls (org.aisen.weibo.sina.sinasdk.bean.PicUrls)1 SearchsResultUser (org.aisen.weibo.sina.sinasdk.bean.SearchsResultUser)1 StatusContent (org.aisen.weibo.sina.sinasdk.bean.StatusContent)1 UrlsBean (org.aisen.weibo.sina.sinasdk.bean.UrlsBean)1 WallpaperBeans (org.aisen.weibo.sina.support.bean.WallpaperBeans)1 Document (org.jsoup.nodes.Document)1 Elements (org.jsoup.select.Elements)1