您的浏览器已禁用 JavaScript。
跳过导航链接
me.chanjar.weixin.mp.api.impl

类 WxMpDraftServiceImpl

  • 所有已实现的接口:
    WxMpDraftService


    public class WxMpDraftServiceImpl
    extends Object
    implements WxMpDraftService 
    草稿箱能力-service实现类.
    作者:
    dragon created on 2021年10月22日
    • 构造器详细资料

      • WxMpDraftServiceImpl

        public WxMpDraftServiceImpl()
    • 方法详细资料

      • addDraft

        public String addDraft(String title,
         String content,
         String thumbMediaId)
         throws WxErrorException 
        从接口复制的说明: WxMpDraftService
        新建草稿 - 只有默认必填参数
         请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/add?access_token=ACCESS_TOKEN
         文档地址:https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Add_draft.html
         
        指定者:
        addDraft 在接口中 WxMpDraftService
        参数:
        title - 标题
        content - 图文消息的具体内容,支持HTML标签,必须少于2万字符,小于1M,且此处会去除JS,涉及图片url必须来源 "上传图文消息内的图片获取URL"接口获取。外部图片url将被过滤。
        thumbMediaId - 图文消息的封面图片素材id(必须是永久MediaID)
        返回:
        the string
        抛出:
        WxErrorException - .
      • addDraft

        public String addDraft(WxMpAddDraft addDraft)
         throws WxErrorException 
        从接口复制的说明: WxMpDraftService
        新建草稿 - 完整参数
         请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/add?access_token=ACCESS_TOKEN
         文档地址:https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Add_draft.html
         
        指定者:
        addDraft 在接口中 WxMpDraftService
        参数:
        addDraft - 新建草稿信息
        返回:
        the string
        抛出:
        WxErrorException - .
      • updateDraft

        public Boolean updateDraft(WxMpUpdateDraft updateDraftInfo)
         throws WxErrorException 
        从接口复制的说明: WxMpDraftService
        修改草稿 - 完整参数 正常情况下调用成功时,errcode将为0。错误时微信会返回错误码等信息,请根据错误码查询错误信息
         请求地址: POST https://api.weixin.qq.com/cgi-bin/draft/update?access_token=ACCESS_TOKEN
         文档地址:https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Update_draft.html
         
        指定者:
        updateDraft 在接口中 WxMpDraftService
        参数:
        updateDraftInfo - 修改草稿信息
        返回:
        the boolean
        抛出:
        WxErrorException - .
      • getDraft

        public WxMpDraftInfo getDraft(String mediaId)
         throws WxErrorException 
        从接口复制的说明: WxMpDraftService
        获取草稿信息
         请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/get?access_token=ACCESS_TOKEN
         文档地址:https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Get_draft.html
         
        指定者:
        getDraft 在接口中 WxMpDraftService
        参数:
        mediaId - 要获取的草稿的media_id
        返回:
        草稿信息 draft
        抛出:
        WxErrorException - .
      • delDraft

        public Boolean delDraft(String mediaId)
         throws WxErrorException 
        从接口复制的说明: WxMpDraftService
        删除草稿 正常情况下调用成功时,errcode将为0。错误时微信会返回错误码等信息,请根据错误码查询错误信息。 多次删除同一篇草稿,也返回 0.
         请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/delete?access_token=ACCESS_TOKEN
         文档地址:https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Delete_draft.html
         
        指定者:
        delDraft 在接口中 WxMpDraftService
        参数:
        mediaId - 要删除的草稿的media_id
        返回:
        the boolean
        抛出:
        WxErrorException - .
      • listDraft

        public WxMpDraftList listDraft(int offset,
         int count,
         int noContent)
         throws WxErrorException 
        从接口复制的说明: WxMpDraftService
        获取草稿列表
         请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/batchget?access_token=ACCESS_TOKEN
         文档地址:https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Get_draft_list.html
         
        指定者:
        listDraft 在接口中 WxMpDraftService
        参数:
        offset - 分页页数,从0开始 从全部素材的该偏移位置开始返回,0表示从第一个素材返回
        count - 每页数量 返回素材的数量,取值在1到20之间
        noContent - 1 表示不返回 content 字段,0 表示正常返回,默认为 0
        返回:
        草稿信息列表 wx mp draft list
        抛出:
        WxErrorException - .
      • listDraft

        public WxMpDraftList listDraft(int offset,
         int count)
         throws WxErrorException 
        从接口复制的说明: WxMpDraftService
        获取草稿列表
         请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/batchget?access_token=ACCESS_TOKEN
         文档地址:https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Get_draft_list.html
         
        指定者:
        listDraft 在接口中 WxMpDraftService
        参数:
        offset - 分页页数,从0开始 从全部素材的该偏移位置开始返回,0表示从第一个素材返回
        count - 每页数量 返回素材的数量,取值在1到20之间
        返回:
        wx mp draft list
        抛出:
        WxErrorException - the wx error exception
      • countDraft

        public Long countDraft()
         throws WxErrorException 
        从接口复制的说明: WxMpDraftService
        获取草稿数量 开发者可以根据本接口来获取草稿的总数。此接口只统计数量,不返回草稿的具体内容。
         请求地址:POST https://api.weixin.qq.com/cgi-bin/draft/count?access_token=ACCESS_TOKEN
         文档地址:https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Count_drafts.html
         
        指定者:
        countDraft 在接口中 WxMpDraftService
        返回:
        草稿的总数 long
        抛出:
        WxErrorException - .
跳过导航链接

Copyright © 2024. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /