Package com.foxinmy.weixin4j.mp.api
Class CommentApi
- java.lang.Object
-
- com.foxinmy.weixin4j.api.BaseApi
-
- com.foxinmy.weixin4j.mp.api.MpApi
-
- com.foxinmy.weixin4j.mp.api.CommentApi
-
public class CommentApi extends MpApi
文章评论API- Since:
- JDK 1.6
- Author:
- jinyu
- See Also:
- 图文消息留言管理接口
-
-
Constructor Summary
Constructors Constructor Description CommentApi(com.foxinmy.weixin4j.token.TokenManager tokenManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.foxinmy.weixin4j.http.weixin.ApiResult
deleteComment(String msgid, int index, String commentId)
删除评论com.foxinmy.weixin4j.http.weixin.ApiResult
deleteCommentReply(String msgid, int index, String commentId)
删除回复List<ArticleComment>
listAllArticleComments(ArticleComment.ArticleCommentType commentType, String msgid, int index)
获取评论列表com.foxinmy.weixin4j.model.paging.Pagedata<ArticleComment>
listArticleComments(com.foxinmy.weixin4j.model.paging.Pageable page, ArticleComment.ArticleCommentType commentType, String msgid, int index)
获取评论列表com.foxinmy.weixin4j.http.weixin.ApiResult
markelectComment(boolean markelect, String msgid, int index, String commentId)
评论标记/取消精选com.foxinmy.weixin4j.http.weixin.ApiResult
openComment(boolean open, String msgid, int index)
打开/关闭已群发文章评论com.foxinmy.weixin4j.http.weixin.ApiResult
replyComment(String msgid, int index, String commentId, String content)
回复评论-
Methods inherited from class com.foxinmy.weixin4j.mp.api.MpApi
weixinBundle
-
-
-
-
Method Detail
-
openComment
public com.foxinmy.weixin4j.http.weixin.ApiResult openComment(boolean open, String msgid, int index) throws com.foxinmy.weixin4j.exception.WeixinException
打开/关闭已群发文章评论- Parameters:
open
- true为打开,false为关闭msgid
- 群发返回的msg_data_idindex
- 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文- Returns:
- 操作结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
-
listArticleComments
public com.foxinmy.weixin4j.model.paging.Pagedata<ArticleComment> listArticleComments(com.foxinmy.weixin4j.model.paging.Pageable page, ArticleComment.ArticleCommentType commentType, String msgid, int index) throws com.foxinmy.weixin4j.exception.WeixinException
获取评论列表- Parameters:
page
- 分页信息commentType
- 评论类型 为空获取全部类型msgid
- 群发返回的msg_data_idindex
- 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文- Returns:
- 分页数据
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
ArticleComment
,ArticleComment.ArticleCommentType
-
listAllArticleComments
public List<ArticleComment> listAllArticleComments(ArticleComment.ArticleCommentType commentType, String msgid, int index) throws com.foxinmy.weixin4j.exception.WeixinException
获取评论列表- Parameters:
commentType
- 评论类型 为空获取全部类型msgid
- 群发返回的msg_data_idindex
- 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文- Returns:
- 分页数据
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
listArticleComments(Pageable, ArticleCommentType, String, int)
-
markelectComment
public com.foxinmy.weixin4j.http.weixin.ApiResult markelectComment(boolean markelect, String msgid, int index, String commentId) throws com.foxinmy.weixin4j.exception.WeixinException
评论标记/取消精选- Parameters:
markelect
- true为标记,false为取消msgid
- 群发返回的msg_data_idindex
- 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文commentId
- 用户评论ID- Returns:
- 操作结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
listArticleComments(Pageable, ArticleCommentType, String, int)
-
deleteComment
public com.foxinmy.weixin4j.http.weixin.ApiResult deleteComment(String msgid, int index, String commentId) throws com.foxinmy.weixin4j.exception.WeixinException
删除评论- Parameters:
msgid
- 群发返回的msg_data_idindex
- 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文commentId
- 用户评论ID- Returns:
- 操作结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
listArticleComments(Pageable, ArticleCommentType, String, int)
-
replyComment
public com.foxinmy.weixin4j.http.weixin.ApiResult replyComment(String msgid, int index, String commentId, String content) throws com.foxinmy.weixin4j.exception.WeixinException
回复评论- Parameters:
msgid
- 群发返回的msg_data_idindex
- 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文commentId
- 用户评论IDcontent
- 回复内容- Returns:
- 操作结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
listArticleComments(Pageable, ArticleCommentType, String, int)
-
deleteCommentReply
public com.foxinmy.weixin4j.http.weixin.ApiResult deleteCommentReply(String msgid, int index, String commentId) throws com.foxinmy.weixin4j.exception.WeixinException
删除回复- Parameters:
msgid
- 群发返回的msg_data_idindex
- 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文commentId
- 用户评论ID- Returns:
- 操作结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
listArticleComments(Pageable, ArticleCommentType, String, int)
-
-