public interface WxMpFreePublishService
限定符和类型 | 方法和说明 |
---|---|
Boolean |
deletePush(String articleId,
Integer index)
删除发布
发布成功之后,随时可以通过该接口删除。
|
Boolean |
deletePushAllArticle(String articleId)
删除发布 - 此条发布的所有内容,不指定文章编号
发布成功之后,随时可以通过该接口删除。
|
WxMpFreePublishInfo |
getArticleFromId(String articleId)
通过 article_id 获取已发布文章
开发者可以通过 article_id 获取已发布的图文信息。
|
WxMpFreePublishList |
getPublicationRecords(int offset,
int count)
获取成功发布列表 - 默认返回 图文消息的具体内容
请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/batchget?
|
WxMpFreePublishList |
getPublicationRecords(int offset,
int count,
int noContent)
获取成功发布列表 - 支持选择是否返回:图文消息的具体内容
请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/batchget?
|
WxMpFreePublishStatus |
getPushStatus(String publishId)
发布状态轮询接口
开发者可以尝试通过下面的发布状态轮询接口获知发布情况。
|
String |
submit(String mediaId)
发布接口 - 只有默认必填参数
开发者需要先将图文素材以草稿的形式保存(见“草稿箱/新建草稿”,如需从已保存的草稿中选择,见“草稿箱/获取草稿列表”),选择要发布的草稿 media_id 进行发布
请求地址:POST https://api.weixin.qq.com/cgi-bin/freepublish/submit?
|
String submit(String mediaId) throws WxErrorException
请求地址:POST https://api.weixin.qq.com/cgi-bin/freepublish/submit?access_token=ACCESS_TOKEN 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Publish/Publish.html
mediaId
- 要发布的草稿的media_idWxErrorException
- .WxMpFreePublishStatus getPushStatus(String publishId) throws WxErrorException
请求地址:POST https://api.weixin.qq.com/cgi-bin/freepublish/get?access_token=ACCESS_TOKEN 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Publish/Get_status.html
publishId
- 发布任务idWxErrorException
- .Boolean deletePush(String articleId, Integer index) throws WxErrorException
请求地址:POST https://api.weixin.qq.com/cgi-bin/freepublish/delete?access_token=ACCESS_TOKEN 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Publish/Delete_posts.html
articleId
- 成功发布时返回的 article_idindex
- 要删除的文章在图文消息中的位置,第一篇编号为1,该字段不填或填0会删除全部文章WxErrorException
- .Boolean deletePushAllArticle(String articleId) throws WxErrorException
请求地址:POST https://api.weixin.qq.com/cgi-bin/freepublish/delete?access_token=ACCESS_TOKEN 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Publish/Delete_posts.html
articleId
- 成功发布时返回的 article_idWxErrorException
- .WxMpFreePublishInfo getArticleFromId(String articleId) throws WxErrorException
请求地址:POST https://api.weixin.qq.com/cgi-bin/freepublish/getarticle?access_token=ACCESS_TOKEN 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Publish/Get_article_from_id.html
articleId
- 要获取的草稿的article_idWxErrorException
- .WxMpFreePublishList getPublicationRecords(int offset, int count, int noContent) throws WxErrorException
请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/batchget?access_token=ACCESS_TOKEN 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Publish/Get_publication_records.html
offset
- 分页页数,从0开始 从全部素材的该偏移位置开始返回,0表示从第一个素材返回count
- 每页数量 返回素材的数量,取值在1到20之间noContent
- 1 表示不返回 content 字段,0 表示正常返回,默认为 0WxErrorException
- .WxMpFreePublishList getPublicationRecords(int offset, int count) throws WxErrorException
请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/batchget?access_token=ACCESS_TOKEN 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Publish/Get_publication_records.html
offset
- 分页页数,从0开始 从全部素材的该偏移位置开始返回,0表示从第一个素材返回count
- 每页数量 返回素材的数量,取值在1到20之间WxErrorException
- the wx error exceptionCopyright © 2024. All rights reserved.