All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.binarywang.wx.miniapp.api.WxMaMsgService Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package cn.binarywang.wx.miniapp.api;

import cn.binarywang.wx.miniapp.bean.WxMaKefuMessage;
import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage;
import cn.binarywang.wx.miniapp.bean.WxMaUniformMessage;
import cn.binarywang.wx.miniapp.bean.WxMaUpdatableMsg;
import com.google.gson.JsonObject;
import me.chanjar.weixin.common.error.WxErrorException;

/**
 * 消息发送接口
 *
 * @author Binary Wang
 */
public interface WxMaMsgService {

  /**
   * 
   * 发送客服消息
   * 详情请见: 发送客服消息
   * 接口url格式:https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN
   * 
* * @param message 客服消息 * @return . * @throws WxErrorException . */ boolean sendKefuMsg(WxMaKefuMessage message) throws WxErrorException; /** *
   * 发送订阅消息
   * https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.send.html
   * 
* * @param subscribeMessage 订阅消息 * @throws WxErrorException . */ void sendSubscribeMsg(WxMaSubscribeMessage subscribeMessage) throws WxErrorException; /** *
   * 下发小程序和公众号统一的服务消息
   * 详情请见: 下发小程序和公众号统一的服务消息
   * 接口url格式:https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token=ACCESS_TOKEN
   * 
* * @param uniformMessage 消息 * @throws WxErrorException . */ void sendUniformMsg(WxMaUniformMessage uniformMessage) throws WxErrorException; /** *
   *  创建被分享动态消息的 activity_id.
   *  动态消息: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share/updatable-message.html
   *
   *  文档地址:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html
   *  接口地址:GET https://api.weixin.qq.com/cgi-bin/message/wxopen/activityid/create?access_token=ACCESS_TOKEN
   * 
* * @return . * @throws WxErrorException . */ JsonObject createUpdatableMessageActivityId() throws WxErrorException; /** *
   *  修改被分享的动态消息.
   *  动态消息: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share/updatable-message.html
   *
   *  文档地址:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/updatable-message/updatableMessage.setUpdatableMsg.html
   *  接口地址:POST https://api.weixin.qq.com/cgi-bin/message/wxopen/activityid/create?access_token=ACCESS_TOKEN
   * 
* * @param msg 动态消息 * @throws WxErrorException . */ void setUpdatableMsg(WxMaUpdatableMsg msg) throws WxErrorException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy