use of org.aisen.android.common.setting.Setting in project AisenWeiBo by wangdan.
the class SinaSDK method commentsShow.
/**
* @param id
* (true) 需要查询的微博ID
* @param since_id
* (false) 若指定此参数,则返回ID比since_id大的评论(即比since_id时间晚的评论),默认为0
* @param max_id
* (false) 若指定此参数,则返回ID小于或等于max_id的评论,默认为0
* @param count
* (false) 单页返回的记录条数,默认为50
* @param page
* (false) 返回结果的页码,默认为1
* @param filter_by_author
* (false) 作者筛选类型,0:全部、1:我关注的人、2:陌生人,默认为0
* @return
*/
public StatusComments commentsShow(Params params) throws TaskException {
if (!params.containsKey("count"))
params.addParameter("count", getPageCount(getSetting("commentsShow")));
Setting action = getSetting("commentsShow");
action.getExtras().put(HTTP_UTILITY, newSettingExtra(HTTP_UTILITY, TimelineCommentHttpUtility.class.getName(), ""));
return doGet(action, configParams(params), StatusComments.class);
}
use of org.aisen.android.common.setting.Setting in project AisenWeiBo by wangdan.
the class SinaSDK method webGetHotTopicsRecommendStatus.
/**
* 热门话题的推荐微博列表
*
* @param uid
* @param containerId
* @return
* @throws TaskException
*/
public StatusContents webGetHotTopicsRecommendStatus(String uid, String containerId, String sinceId) throws TaskException {
Params params = new Params();
params.addParameter("uid", uid);
params.addParameter("containerid", String.format("230530%s__default__mobile_info_-_pageapp:2305576d91c8d1eef00b0e5caac7d245bc1350", containerId));
if (!TextUtils.isEmpty(sinceId)) {
params.addParameter("since_id", sinceId);
}
Setting action = newSetting("webGetHotTopicsStatus", "container/getIndex", "热门话题推荐微博");
action.getExtras().put(HTTP_UTILITY, newSettingExtra(HTTP_UTILITY, TimelineHotTopicsHttpUtility.class.getName(), ""));
try {
return doGet(webConfig(), action, params, StatusContents.class);
} catch (Exception e) {
if (e instanceof TaskException)
checkWebResult((TaskException) e);
throw e;
}
}
use of org.aisen.android.common.setting.Setting in project AisenWeiBo by wangdan.
the class SinaSDK method statusesToMe.
/**
* 获取当前登录用户关注的人发给其的定向微博
*
* @param params
* @param token
* @return
*/
public StatusContents statusesToMe(Params params) throws TaskException {
if (!params.containsKey("count"))
params.addParameter("count", getPageCount(getSetting("statusesToMe")));
Setting action = getSetting("statusesToMe");
action.getExtras().put(HTTP_UTILITY, newSettingExtra(HTTP_UTILITY, TimelineHttpUtility.class.getName(), ""));
return doGet(action, configParams(params), StatusContents.class);
}
use of org.aisen.android.common.setting.Setting in project AisenWeiBo by wangdan.
the class SinaSDK method searchTopics.
/**
* 搜索某一话题下的微博
*
* @param count
* 单页返回的记录条数,默认为50
* @param page
* 返回结果的页码,默认为1
* @param token
* @return
*/
public StatusContents searchTopics(String page, String topics, String count) throws TaskException {
Params params = new Params();
params.addParameter("page", page);
if (!TextUtils.isEmpty(count))
params.addParameter("count", count);
else
params.addParameter("count", getPageCount(getSetting("searchTopics")));
params.addParameter("q", topics);
params.setEncodeAble(false);
Setting action = getSetting("searchTopics");
action.getExtras().put(HTTP_UTILITY, newSettingExtra(HTTP_UTILITY, TimelineHttpUtility.class.getName(), ""));
return doGet(action, configParams(params), StatusContents.class);
}
use of org.aisen.android.common.setting.Setting in project AisenWeiBo by wangdan.
the class SinaSDK method webGetUnread.
/**
* 获取网页版未读消息
*
* @return
* @throws TaskException
*/
public String webGetUnread() throws TaskException {
Params params = new Params();
params.addParameter("t", System.currentTimeMillis() + "");
Setting action = newSetting("getWebUnread", "unread", "网页版未读");
return doGet(webConfig(), action, params, String.class);
}
Aggregations