/**
* @deprecated 饭否没有评论功能
* @param comment the comment text
* @param id status id
* @param cid reply comment id, can be null
* @return the comment object
* @throws WeiboException
*/
public Comment updateComment(String comment, String id, String cid) throws WeiboException {
PostParameter[] params = null;
if (cid == null)
params = new PostParameter[] {
new PostParameter("comment", comment),
new PostParameter("id", id)
};
else
params = new PostParameter[] {
new PostParameter("comment", comment),
new PostParameter("cid", cid),
new PostParameter("id", id)
};
// return new Comment(http.post(getBaseURL() + "statuses/comment.xml", params, true), this);
return new Comment(http.post(getBaseURL() + "statuses/comment.json", params, true));
}
/**
* Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status.
* <br>This method calls http://api.t.sina.com.cn/statuses/comment_destroy/id.format
*
* @param statusId The ID of the status to destroy.
* @return the deleted status
* @throws WeiboException when Weibo service or network is unavailable
* @deprecated 饭否没有评论功能
* @since 1.0.5
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/comment_destroy">statuses/comment_destroy </a>
*/
public Comment destroyComment(long commentId) throws WeiboException {
return new Comment(http.delete(getBaseURL() + "statuses/comment_destroy/" + commentId + ".json?source=" + CONSUMER_KEY,
true));
/*return new Comment(http.delete(getBaseURL() + "statuses/comment_destroy/" + commentId + ".xml?source=" + CONSUMER_KEY,
true), this);*/
}
/*********************************************/
/**
* Returns the specified user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @return the list of friends
* @throws WeiboException when Weibo service or network is unavailable
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/friends">statuses/friends </a>
* @deprecated use getFriendsStatues() instead
*/
public List<User> getFriends() throws WeiboException {
return getFriendsStatuses();
}
/**
* Returns the specified user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @return the list of friends
* @throws WeiboException when Weibo service or network is unavailable
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/friends">statuses/friends </a>
* @since Weibo4J 2.0.9
*/
public List<User> getFriendsStatuses() throws WeiboException {
// return User.constructUsers(get(getBaseURL() + "statuses/friends.xml", true), this);
return User.constructResult(get(getBaseURL() + "users/friends.json", true));
}
/**
* Returns the specified user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @param paging controls pagination
* @return the list of friends
* @throws WeiboException when Weibo service or network is unavailable
* @since Weibo4J 2.0.1
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/friends">statuses/friends </a>
* @deprecated Use getFriendsStatuses(Paging paging) instead
*/
public List<User> getFriends(Paging paging) throws WeiboException {
return getFriendsStatuses(paging);
}
/**
* Returns the specified user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @param paging controls pagination
* @return the list of friends
* @throws WeiboException when Weibo service or network is unavailable
* @since Weibo4J 2.0.9
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/friends">statuses/friends </a>
*/
public List<User> getFriendsStatuses(Paging paging) throws WeiboException {
/*return User.constructUsers(get(getBaseURL() + "statuses/friends.xml", null,
paging, true), this);*/
return User.constructUsers(get(getBaseURL() + "users/friends.json", null,
paging, true));
}
/**
* Returns the specified user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @param page number of page
* @return the list of friends
* @throws WeiboException when Weibo service or network is unavailable
* @deprecated Use getFriendsStatuses(Paging paging) instead
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/friends">statuses/friends </a>
*/
public List<User> getFriends(int page) throws WeiboException {
return getFriendsStatuses(new Paging(page));
}
/**
* Returns the user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @param id the ID or screen name of the user for whom to request a list of friends
* @return the list of friends
* @throws WeiboException when Weibo service or network is unavailable
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/friends">statuses/friends </a>
* @deprecated use getFriendsStatuses(id) instead
*/
public List<User> getFriends(String id) throws WeiboException {
return getFriendsStatuses(id);
}
/**
* Returns the user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @param id the ID or screen name of the user for whom to request a list of friends
* @return the list of friends
* @throws WeiboException when Weibo service or network is unavailable
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/friends">statuses/friends </a>
* @since Weibo4J 2.0.9
*/
public List<User> getFriendsStatuses(String id) throws WeiboException {
/*return User.constructUsers(get(getBaseURL() + "statuses/friends/" + id + ".xml"
, false), this);*/
return User.constructUsers(get(getBaseURL() + "users/friends.json",
new PostParameter[] {new PostParameter("id", id)}
, false));
}
/**
* Returns the user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @param id the ID or screen name of the user for whom to request a list of friends
* @param paging controls pagination
* @return the list of friends
* @throws WeiboException when Weibo service or network is unavailable
* @since Weibo4J 2.0.1
* @see <a href="http://open.t.sina.com.cn/wiki/index.php/Statuses/friends">statuses/friends </a>
* @deprecated use getFriendsStatuses(id,paging) instead
*/
public List<User> getFriends(String id, Paging paging) throws WeiboException {
return getFriendsStatuses(id, paging);
}
/**
* Returns the user's friends, each with current status inline.
* <br>This method calls http://api.t.sina.com.cn/statuses/friends.format
*
* @param id the ID or screen name of the user for whom to request a list of friends
* @param paging controls pa
yxkfw
- 粉丝: 82
- 资源: 2万+
最新资源
- 永磁同步电机直接转矩控制DTC仿真模型,三相PMSM直接转矩控制matlab仿真算法,基于matlab simulink搭建 附参考资料,简单电子资料
- 2025年春节烟花特效html
- Python_利用AI大模型一键生成高清短视频 Generate short videos with one clic.zip
- Python_连接到任何数据源,轻松可视化仪表板和共享您的数据.zip
- Python_利用GDB开发和逆向工程变得容易.zip
- 永磁同步电机PMSMsimulink仿真,模型参考自适应方法在线辩识转动惯量,可选变增益,纯手工搭建,附参考资料
- Python_领先的ETL ELT数据管道数据集成平台,从api数据库文件到数据仓库、数据湖、数据湖,包括自托管和云托.zip
- Python_令人敬畏的开源启动替代知名SaaS产品列表.zip
- Python_流氓接入点框架.zip
- Python_马尔:口齿不清.zip
- Python_免费超快副驾驶替代Vim和Neovim.zip
- Python_麦考夫核心麦考夫人工智能平台.zip
- Python_每个人的开源机器学习框架.zip
- Python_免费的计算机编程类中文书籍欢迎投稿.zip
- 光伏逆变器仿真模型,boost加NPC拓扑结构,基于MATLAB Simulink建模仿真 具备中点平衡SVPWM控制,正负序分离控制,可以进行功率调度仿真 仿真模型使用MATLAB 2017b搭
- Python_免费和开源企业资源规划ERP.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈