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